CDD: new section 3.9.2 "Managed Profile Support"

This section contains all the requirements for device support of managed
profile functionality, including:
  - The definition of which devices must support managed profiles
  - Requirements around supporting managed profile provisioning flow
  - The UX elements that must be implemented:
    - work badging (existing requirement)
    - cross profile intent chooser
    - work profile notification and toasts
  - The requirements around layout of managed profile settings
  - How the preloaded apps must use managed profile contacts APIs

Bug: 19170225
Bug: 21745202
Bug: 22796073
Bug: 22796423
Bug: 22796465
Bug: 22797271
Bug: 22797354

Change-Id: Iab90e3964c291bf20dd681de5964e2daa943ed15
diff --git a/src/compatibility/android-cdd.html b/src/compatibility/android-cdd.html
index 276bb5a..61cee9a 100644
--- a/src/compatibility/android-cdd.html
+++ b/src/compatibility/android-cdd.html
@@ -102,6 +102,9 @@
 <p class="toc_h4"><a href="#3_9_1_2_managed_profile_provisioning"> Managed profile provisioning</a></p>
+<p class="toc_h3"><a href="#3_9_2_managed_profile_support">3.9.2. Managed Profile Support</a></p>
 <p class="toc_h2"><a href="#3_10_accessibility">3.10. Accessibility</a></p>
 <p class="toc_h2"><a href="#3_11_text-to-speech">3.11. Text-to-Speech</a></p>
@@ -1540,6 +1543,52 @@
 Resources, XX</a>]) user experience MUST align with the AOSP implementation
+<h2 id="3_9_2_managed_profile_support">3.9.2 Managed Profile Support</h2>
+<p>Managed profile capable devices are those devices that:</p>
+  <li>Declare (see <a href="#3_9_device_administration">section 3.9 Device Administration)</a></li>
+  <li>Are not low RAM devices (see <a href="#7_6_1_minimum_memory_and_storage">section 7.6.1</a></li>
+  <li>Allocate internal (non-removable) storage as shared storage (see
+    <a href="#7_6_2_application_shared_storage">section 7.6.2</a>)</li>
+<p>Managed profile capable devices MUST:</p>
+  <li>Declare the platform feature flag</li>
+  <li>Support managed profiles via the APIs</li>
+  <li>Allow a managed profile to be created [<a href=""> Resources, XX</a>]</li>
+  <li>Use an icon badge (similar to the AOSP upstream work badge) to represent
+the managed applications and widgets and other badged UI elements like Recents
+&amp; Notifications</li>
+  <li>Display a notification icon (similar to the AOSP upstream work badge) to
+indicate when user is within a managed profile application</li>
+  <li>Display a toast indicating that the user is in the managed profile if and when the
+device wakes up (ACTION_USER_PRESENT) and the foreground application is within
+the managed profile</li>
+  <li>Where a managed profile exists, show a visual affordance in the Intent
+'Chooser' to allow the user to forward the intent from the managed to the personal
+profiles or vice versa, if enabled by the Device Policy Controller</li>
+  <li>Expose the following user affordances for both primary and managed profiles
+(when they exist):
+    <ul>
+      <li>Separate accounting for battery, location, mobile data and storage usage
+      for the primary and managed profiles</li>
+      <li>Independent management of VPN Applications installed within the primary
+      or managed profiles</li>
+      <li>Independent management of applications installed within the primary or
+      managed profiles</li>
+      <li>Independent management of user accounts within the primary or managed
+      profiles</li>
+    </ul>
+  </li>
+  <li>Ensure the default dialer can look up caller information from the managed
+profile (if one exists) alongside those from the primary profile</li>
+  <li>Ensure that all the security requirements for multi user (see
+<a href="#9_5_multi-user_support">section 9.5<a/>) apply to
+managed profiles.</li>
 <h2 id="3_10_accessibility">3.10. Accessibility</h2>
@@ -4260,13 +4309,6 @@
   <li>Device implementations MUST, for each user, implement a security model
 consistent with the Android platform security model as defined in Security and
 Permissions reference document in the APIs [<a href="">Resources, 102</a>].</li>
-  <li>Device implementations MAY support creating users and managed profiles via the APIs, and if supported, MUST declare the
-platform feature flag
-  <li>Device implementations that declare the feature flag MUST use the upstream AOSP icon badge to
-represent the managed applications and other badge UI elements like Recents &amp;
   <li>Each user instance on an Android device MUST have separate and isolated
 external storage directories. Device implementations MAY store multiple users'
 data on the same volume or filesystem. However, the device implementation MUST
@@ -4753,6 +4795,10 @@
 <p><a href=""></a></p>
+<p>XX. Managed profile provisioning intent</p>
+<p><a href=""></a></p>
 <p>42. Android Accessibility Service APIs: <a href=""></a></p>
 <p>43. Android Accessibility APIs: <a href=""></a></p>