Merge "docs: Clarified when GET_ACCOUNTS is necessary" into mnc-docs
diff --git a/docs/html/google/play/billing/billing_subscriptions.jd b/docs/html/google/play/billing/billing_subscriptions.jd
index da9eafd..069947d 100644
--- a/docs/html/google/play/billing/billing_subscriptions.jd
+++ b/docs/html/google/play/billing/billing_subscriptions.jd
@@ -313,8 +313,8 @@
 try your subscription content before buying it. The trial period runs for the
 period of time that you set and then automatically converts to a full
 subscription managed according to the subscription's billing interval and
-price. Free trials are supported for monthly and annual subscriptions only, and
-are not supported for seasonal subscriptions.</p>
+price. Google Play supports free trials for all subscription types, including
+seasonal subscriptions.</p>
 
 <p>To take advantage of a free trial, a user must "purchase" the full
 subscription through the standard In-app Billing flow, providing a valid form of
@@ -332,10 +332,10 @@
 the amount set
 for the full subscription, and continuing at the subscription interval. If
 necessary, the user can cancel the subscription at any time during the trial
-period. In this case, Google Play <em>marks the subscription as expired immediately</em>,
-rather than waiting until the end of the trial period. The user has not
-paid for the trial period and so is not entitled to continued access after
-cancellation.</p>
+period. In this case, the subscription remains active until the end of the
+trial period, but Google Play sets the subscription <em>not</em> to renew
+automatically; at the end of the trial period the subscription expires, and
+Google Play does not charge the user.</p>
 
 <p>You can set up a trial period for a subscription in the Developer Console,
 without needing to modify or update your APK. Just locate and edit the
@@ -371,6 +371,24 @@
 product from the product list offered in your app to prevent users from seeing
 or purchasing it.</p>
 
+<h3 id="prorate">Prorated Seasonal Subscription Prices</h3>
+
+<p>You can set up prorated prices for users who buy seasonal subscriptions
+after the season's start date. You specify the date on which the discounted
+price takes effect. The discounted price takes effect at 0:00 UTC on
+the specified date. You can set multiple prorated prices, dropping the
+subscription price lower and lower as the season goes on. If a user purchases
+a prorated seasonal subscription and remains subscribed until the start of the
+next season, Google Play charges them the full subscription price when the next
+season starts.</p>
+
+<p>For example, the professional checkers season runs from March 1 to August 31.
+The <em>Checkers Dilettante</em> app offers a seasonal subscription for €10. The
+app also offers two prorated prices: €7.50 for users who sign up on or after
+June 1, and €5 for users who sign up on or after
+August 15. Regardless of when the user signs up, the seasonal subscription ends
+on August 31.</p>
+
 <h2 id="cancellation">Subscription Cancellation</h2>
 
 <p>Users can view the status of all of their subscriptions and cancel them if
diff --git a/docs/html/google/play/billing/index.jd b/docs/html/google/play/billing/index.jd
index a964449..b20262f 100644
--- a/docs/html/google/play/billing/index.jd
+++ b/docs/html/google/play/billing/index.jd
@@ -14,6 +14,16 @@
 <div class="sidebox">
   <h2><strong>New in In-App Billing</strong></h2>
   <ul>
+  <li><strong>Prorated Subscription Prices</strong>&mdash;Content providers can
+    lower the price of seasonal subscriptions for users who sign up late in the
+    season. For example, a sports-related service might lower the subscription
+    price halfway through the sport's season.</li>
+  <li><strong>Free Trials</strong>&mdash;Content providers can
+    offer free trial periods for all kinds of subscriptions, including
+    seasonal subscriptions. If a user cancels the subscription in the trial
+    period, they pay nothing. If they do not cancel by the end of the
+    trial period, the subscription automatically converts to a paid
+    subscription.</li>
   <li><strong>Subscription Upgrade/Downgrade</strong>&mdash;A user can
     subscribe to a higher or lower tier of subscription while their current
     subscription is active. The old subscription is canceled, and the unused
diff --git a/docs/html/images/tools/as-api-level-preview.png b/docs/html/images/tools/as-api-level-preview.png
new file mode 100644
index 0000000..602a6ad
--- /dev/null
+++ b/docs/html/images/tools/as-api-level-preview.png
Binary files differ
diff --git a/docs/html/sdk/installing/studio-layout.jd b/docs/html/sdk/installing/studio-layout.jd
index f0e5d59..60cbcb3 100644
--- a/docs/html/sdk/installing/studio-layout.jd
+++ b/docs/html/sdk/installing/studio-layout.jd
@@ -132,6 +132,15 @@
 <p>Within the graphical editor, you can rearrange your app's UI by dragging widgets to
 the desired location.</p>
 
+<h3>Multi-API Version Rendering</h3>
+
+<p>Android Studio supports multi-API version rendering. When you click the Android version icon <img src="{@docRoot}images/tools/as-api-level-preview.png" style="vertical-align:bottom;margin:0;height:19px" /> in the <b>Design</b> view,
+Android Studio allows you to preview your Android layouts across multiple Android API levels.
+</p>
+
+<p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p>
+    <p class="img-caption"><strong>Figure 7.</strong> Multi-API version rendering.</p>
+
 <h3>Taking a snapshot</h3>
 
 <p>When you run your app on a connected device, you can take a snapshot of it by clicking
diff --git a/docs/html/tools/studio/index.jd b/docs/html/tools/studio/index.jd
index 43cb2fe..1c0fe99 100644
--- a/docs/html/tools/studio/index.jd
+++ b/docs/html/tools/studio/index.jd
@@ -432,7 +432,7 @@
 <p>Run <strong>Analyze &gt; Inspect Code</strong> to validate the configured annotations. </p>
 
 <p>For a complete list of the supported annotations, either use the auto-complete feature to display
-the available options for the <code>import android.support.annotation.</code> statement or
+the available options for the <code>import android.support.annotation</code> statement or
 view the contents of the
 {@link android.support.annotation Support-Annotations}
 library. </p>
@@ -440,30 +440,6 @@
 <p>For more details about Android annotations, see
 <a href="{@docRoot}tools/debugging/annotations.html">Improving Code Inspection with Annotations</a>.
 
-
-
-<h3>Dynamic layout preview</h3>
-<p>Android Studio allows you to work with layouts in both a <em>Design View</em> </p>
-<p><img src="{@docRoot}images/tools/studio-helloworld-design.png" alt="" />
-</p>
-    <p class="img-caption"><strong>Figure 6.</strong> Hello World App with Design View.</p>
-
-<p>and a <em>Text View</em>. </p>
-
-    <p><img src="{@docRoot}images/tools/studio-helloworld-text.png" alt="" />
-    <pclass="img-caption"><strong>Figure 7.</strong> Hello World App with text view.</p>
-
-<p>Easily select and preview layout changes for different device images, display
-densities, UI modes, locales, and Android versions (multi-API version rendering).
-    <p><img src="{@docRoot}images/tools/studio-api-version-rendering.png" /></p>
-    <p class="img-caption"><strong>Figure 8.</strong> Multi-API version rendering.</p>
-
-
-<p>From the Design View, you can drag and drop elements from the Palette to the Preview or
-Component Tree. The Text View allows you to directly edit the XML settings, while previewing
-the device display. </p>
-
-
 <h3>Log messages</h3>
 <p>When you build and run your app with Android Studio, you can view adb and device log messages
 (logcat) by clicking <strong>Android</strong> at the bottom of the window.</p>
diff --git a/docs/html/tools/tools_toc.cs b/docs/html/tools/tools_toc.cs
index b7595ce..f6785f2 100644
--- a/docs/html/tools/tools_toc.cs
+++ b/docs/html/tools/tools_toc.cs
@@ -168,6 +168,7 @@
       <li><a href="<?cs var:toroot ?>tools/help/hierarchy-viewer.html">Hierarchy Viewer</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/hprof-conv.html">hprof-conv</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/jobb.html">jobb</a></li>
+      <li><a href="<?cs var:toroot ?>sdk/installing/studio-layout.html">Layout Editor</span></a></li>
       <li><a href="<?cs var:toroot ?>tools/help/lint.html">lint</span></a></li>
       <li><a href="<?cs var:toroot ?>tools/help/logcat.html">logcat</a></li>
       <li><a href="<?cs var:toroot ?>tools/help/mksdcard.html">mksdcard</a></li>
diff --git a/docs/html/training/enterprise/work-policy-ctrl.jd b/docs/html/training/enterprise/work-policy-ctrl.jd
index 5854e65..8225ea3 100644
--- a/docs/html/training/enterprise/work-policy-ctrl.jd
+++ b/docs/html/training/enterprise/work-policy-ctrl.jd
@@ -1,5 +1,6 @@
-page.title=Building a Work Policy Controller
-page.metaDescription=Learn how to develop a Work Policy Controller to create and administer a managed profile on an employee's device.
+page.title=Building a Device Policy Controller
+page.metaDescription=Learn how to develop a device policy controller to create and administer a managed profile on an employee's device.
+page.tags="work policy controller,WPC,device policy controller,DPC"
 @jd:body
 
 <div id="tb-wrapper">
@@ -54,8 +55,9 @@
 </p>
 
 <p>
-  To handle these tasks, an enterprise develops and deploys a Work Policy
-  Controller app. This app is installed on each employee's device. The
+  To handle these tasks, an enterprise develops and deploys
+  a <em>device policy controller</em> app (previously known as a
+  <em>work policy controller</em>). This app is installed on each employee's device. The
   controller app installed on each employee's device and creates a work user
   profile, which accesses enterprise apps and data separately from the user's
   personal account. The controller app also acts as the
@@ -66,7 +68,7 @@
 </p>
 
 <p>
-  This lesson describes how to develop a Work Policy Controller app for devices
+  This lesson describes how to develop a device policy controller app for devices
   in an Android for Work deployment. The lesson describes how to create a work
   user profile, how to set device policies, and how to apply
   restrictions to other apps running on the managed profile.
@@ -85,13 +87,13 @@
   policies to control the behavior of employees' devices and apps. The
   enterprise administrator sets these policies with software provided by their
   Enterprise Mobility Management (EMM) provider. The EMM software communicates
-  with a Work Policy Controller on each device. The Work Policy Controller, in
+  with a device policy controller on each device. The device policy controller, in
   turn, manages the settings and behavior of the work user profile on each
   individual’s device.
 </p>
 
 <p class="note">
-  <strong>Note:</strong> A Work Policy Controller is built on the existing
+  <strong>Note:</strong> A device policy controller is built on the existing
   model used for device administration applications, as described in <a href=
   "{@docRoot}guide/topics/admin/device-admin.html">Device Administration</a>.
   In particular, your app needs to create a subclass of {@link
@@ -177,7 +179,7 @@
   <li>Removes non-required applications from the managed profile.
   </li>
 
-  <li>Copies the Work Policy Controller application into the managed profile and
+  <li>Copies the device policy controller app into the managed profile and
     sets it as the profile owner.
   </li>
 </ul>
@@ -209,9 +211,8 @@
 
 <h3 id="after_creating_profile">After Creating the Managed Profile</h3>
 
-<p>When the profile has been provisioned, the system calls the Work Policy
-Controller app's {@link
-android.app.admin.DeviceAdminReceiver#onProfileProvisioningComplete
+<p>When the profile has been provisioned, the system calls the device policy
+controller app's {@link android.app.admin.DeviceAdminReceiver#onProfileProvisioningComplete
 DeviceAdminReceiver.onProfileProvisioningComplete()} method. Override this
 callback method to finish enabling the managed profile.</p>
 
@@ -257,7 +258,7 @@
 <h2 id="set_up_policies">Set Up Device Policies</h2>
 
 <p>
-  The Work Policy Controller app is responsible for applying the enterprise's
+  The device policy controller app is responsible for applying the enterprise's
   device policies. For example, a particular enterprise might require that all
   devices become locked after a certain number of failed attempts to enter the
   device password. The controller app queries the EMM to find out what
@@ -273,13 +274,12 @@
 
 <h2 id="apply_restrictions">Apply App Restrictions</h2>
 
-<p>Enterprise environments may require that approved apps implement apps
-implement security or feature restrictions. App developers must implement these
-restrictions and declare them for use by enterprise administrators, as described
-in <a href="{@docRoot}training/enterprise/app-restrictions.html">Implementing
-App Restrictions</a>. The Work Policy Controller receives restriction changes
-from the enterprise administrator, and forwards those restriction changes to the
-apps.</p>
+<p>Enterprise environments may require that approved apps implement security
+or feature restrictions. App developers must implement these restrictions
+and declare them for use by enterprise administrators, as described in
+<a href="{@docRoot}training/enterprise/app-restrictions.html">Implementing
+App Restrictions</a>. The device policy controller receives restriction changes
+from the enterprise administrator, and forwards those restriction changes to the apps.</p>
 
 <p>For example, a particular news app might have a restriction setting that
 controls whether the app is allowed to download videos over a cellular
@@ -287,9 +287,9 @@
 notification to the controller app. The controller app, in turn,
 notifies the news app that the restriction setting has changed.</p>
 
-<p class="note"><strong>Note:</strong> This document covers how the Work Policy
-Controller app changes the restriction settings for the other apps on the
-managed profile. Details on how the Work Policy Controller app communicates with
+<p class="note"><strong>Note:</strong> This document covers how the device policy
+controller app changes the restriction settings for the other apps on the
+managed profile. Details on how the device policy controller app communicates with
 the EMM are out of scope for this document.</p>
 
 <p>To change an app's restrictions, call the {@link
@@ -308,7 +308,7 @@
 a cellular network; it must use a Wi-Fi network instead.</p>
 
 <p>
-  If your Work Policy Controller app needs to turn off cellular downloads, it
+  If your device policy controller app needs to turn off cellular downloads, it
   would first fetch the device policy service object, as described above. It
   then assembles a restrictions bundle and passes this bundle to {@link
   android.app.admin.DevicePolicyManager#setApplicationRestrictions
diff --git a/docs/html/training/training_toc.cs b/docs/html/training/training_toc.cs
index b16b569..38f069f 100644
--- a/docs/html/training/training_toc.cs
+++ b/docs/html/training/training_toc.cs
@@ -1207,7 +1207,7 @@
       </a>
       </li>
       <li><a href="<?cs var:toroot ?>training/enterprise/work-policy-ctrl.html">
-        Building a Work Policy Controller
+        Building a Device Policy Controller
       </a>
       </li>
     </ul>
diff --git a/docs/html/training/wearables/data-layer/data-items.jd b/docs/html/training/wearables/data-layer/data-items.jd
index 49a8d32..520a06a 100644
--- a/docs/html/training/wearables/data-layer/data-items.jd
+++ b/docs/html/training/wearables/data-layer/data-items.jd
@@ -158,7 +158,7 @@
 
     &#64;Override
     protected void onResume() {
-        super.onStart();
+        super.onResume();
         mGoogleApiClient.connect();
     }