Merge "Clarify req. for full range of Device Admin Policies and FDE" into lmp-mr1-dev
diff --git a/src/compatibility/5.1/android-5.1-cdd.html b/src/compatibility/5.1/android-5.1-cdd.html
index 28367be..3b4529d 100644
--- a/src/compatibility/5.1/android-5.1-cdd.html
+++ b/src/compatibility/5.1/android-5.1-cdd.html
@@ -42,7 +42,9 @@
 
 <p class="toc_h2"><a href="#3_3_native_api_compatibility">3.3. Native API Compatibility</a></p>
 
-<p class="toc_h3"><a href="#3_3_1_application_binary_interfaces">3.3.1 Application Binary Interfaces</a></p>
+<p class="toc_h3"><a href="#3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</a></p>
+
+<p class="toc_h3"><a href="#3_3_2_32-bit_arm_native_code_compatibility">3.3.2. 32-bit ARM Native Code Compatibility</a></p>
 
 <p class="toc_h2"><a href="#3_4_web_compatibility">3.4. Web Compatibility</a></p>
 
@@ -823,7 +825,7 @@
 <h2 id="3_3_native_api_compatibility">3.3. Native API Compatibility</h2>
 
 
-<h3 id="3_3_1_application_binary_interfaces">3.3.1 Application Binary Interfaces</h3>
+<h3 id="3_3_1_application_binary_interfaces">3.3.1. Application Binary Interfaces</h3>
 
 
 <p>Managed Dalvik bytecode can call into native code provided in the application
@@ -891,6 +893,37 @@
 are <strong>very strongly encouraged</strong> to use the implementations of the libraries listed above from the upstream
 Android Open Source Project. </p>
 
+<h3 id="3_3_2_32-bit_arm_native_code_compatibility">
+3.3.2. 32-bit ARM Native Code Compatibility
+</h3>
+
+<p>The ARMv8 architecture deprecates several CPU operations, including some
+operations used in existing native code.  On 64-bit ARM devices, the following
+deprecated operations MUST remain available to 32-bit native ARM code, either
+through native CPU support or through software emulation:</p>
+
+<ul>
+<li>SWP and SWPB instructions</li>
+<li>SETEND instruction</li>
+<li>CP15ISB, CP15DSB, and CP15DMB barrier operations</li>
+</ul>
+
+<p>Legacy versions of the Android NDK used /proc/cpuinfo to discover CPU features
+from 32-bit ARM native code. For compatibility with applications built using this
+NDK, devices MUST include the following lines in /proc/cpuinfo when it is read
+by 32-bit ARM applications:</p>
+
+<ul>
+<li>&quot;Features: &quot;, followed by a list of any optional ARMv7 CPU features
+supported by the device</li>
+<li>&quot;CPU architecture: &quot;, followed by an integer describing the device's
+highest supported ARM architecture (e.g., &quot;8&quot; for ARMv8 devices)</li>
+</ul>
+
+<p>These requirements only apply when /proc/cpuinfo is read by 32-bit ARM
+applications. Devices SHOULD not alter /proc/cpuinfo when read by 64-bit ARM or
+non-ARM applications.</p>
+
 <h2 id="3_4_web_compatibility">3.4. Web Compatibility</h2>
 
 
@@ -916,12 +949,14 @@
 build from the upstream Android Open Source Project for Android 5.1. This build
 includes a specific set of functionality and security fixes for the WebView [<a href="http://www.chromium.org/">Resources, 13</a>].</li>
   <li>The user agent string reported by the WebView MUST be in this format:
-<p>Mozilla/5.1 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD))
+<p>Mozilla/5.1 (Linux; Android $(VERSION); $(MODEL) Build/$(BUILD)$(WEBVIEW))
 AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 $(CHROMIUM_VER) Mobile
 Safari/537.36</p>
   <ul>
     <li>The value of the $(VERSION) string MUST be the same as the value for
 android.os.Build.VERSION.RELEASE.</li>
+    <li>The $(WEBVIEW) string MAY be omitted, but if included MUST be "; wv" to
+        note that this is a webview</li>
     <li>The value of the $(MODEL) string MUST be the same as the value for
 android.os.Build.MODEL.</li>
     <li>The value of the $(BUILD) string MUST be the same as the value for
@@ -1477,16 +1512,24 @@
 services [<a href="http://developer.android.com/reference/android/speech/tts/package-summary.html">Resources, 45</a>]. Device implementations reporting the feature android.hardware.audio.output
 MUST meet these requirements related to the Android TTS framework. </p>
 
-<p>Device implementations:</p>
+<p>Android Automotive implementations:</p>
+<ul>
+<li>MUST support the Android TTS framework APIs.</li>
+<li>MAY support installation of third-party TTS engines. If supported, partners
+MUST provide a user-accessible interface that allows the user to select a TTS
+engine for use at system level.</li>
+</ul>
+
+<p>All other device implementations:</p>
 
 <ul>
-  <li>MUST support the Android TTS framework APIs and SHOULD include a TTS engine
+  <li> MUST support the Android TTS framework APIs and SHOULD include a TTS engine
 supporting the languages available on the device. Note that the upstream
 Android open source software includes a full-featured TTS engine
-implementation.</li>
-  <li>MUST support installation of third-party TTS engines.</li>
-  <li>MUST provide a user-accessible interface that allows users to select a TTS
-engine for use at the system level.</li>
+implementation.
+  <li> MUST support installation of third-party TTS engines
+  <li> MUST provide a user-accessible interface that allows users to select a TTS
+engine for use at the system level
 </ul>
 
 <h2 id="3_12_tv_input_framework">3.12. TV Input Framework</h2>
@@ -3376,7 +3419,7 @@
 Forum specifications cited above.)</p>
 
 <p>Android includes support for NFC Host Card Emulation (HCE) mode. If a
-device implementation does include an NFC controller capable of HCE and
+device implementation does include an NFC controller chipset capable of HCE and
 Application ID (AID) routing, then it:</p>
 
 <ul>
@@ -3639,9 +3682,18 @@
  </tr>
  <tr>
     <td><ul>
-    <li class="table_list">xhdpi or lower on small/normal screens</li>
-    <li class="table_list">hdpi or lower on large screens</li>
-    <li class="table_list">mdpi or lower on extra large screens</li></ul></td>
+    <li class="table_list">hdpi or lower on small/normal screens</li>
+    <li class="table_list">mdpi or lower on large screens</li>
+    <li class="table_list">ldpi or lower on extra large screens</li>
+    </ul></td>
+    <td>424MB</td>
+    <td>Not applicable</td>
+ </tr>
+ <tr>
+    <td><ul>
+    <li class="table_list">xhdpi or higher on small/normal screens</li>
+    <li class="table_list">hdpi or higher on large screens</li>
+    <li class="table_list">mdpi or higher on extra large screens</li></ul></td>
     <td>512MB</td>
     <td>832MB</td>
  </tr>
@@ -3668,6 +3720,10 @@
 dedicated to hardware components such as radio, video, and so on that is not
 under the kernel&rsquo;s control.</p>
 
+<p>Device implementations with less than 512MB of memory available to the kernel
+and userspace, unless an Android Watch, MUST return the value "true" for
+ActivityManager.isLowRamDevice().</p>
+
 <p>Android Television devices MUST have at least 5GB and other device
 implementations MUST have at least 1.5GB of non-volatile storage available for
 application private data. That is, the /data partition MUST be at least 5GB for
@@ -4109,12 +4165,16 @@
 
 <h2 id="9_8_privacy">9.8. Privacy</h2>
 
-
 <p>If the device implements functionality in the system that captures the contents
 displayed on the screen and/or records the audio stream played on the device,
 it MUST continuously notify the user whenever this functionality is enabled and
 actively capturing/recording.</p>
 
+<p>If a device implementation has a mechanism that routes network data traffic
+through a proxy server or VPN gateway by default (for example, preloading a VPN
+service with android.permission.CONTROL_VPN granted), the device implementation
+MUST ask for the user's consent before enabling that mechanism.</p>
+
 <h2 id="9_9_full-disk_encryption">9.9. Full-Disk Encryption</h2>
 
 <div class="note">
@@ -4344,6 +4404,10 @@
     <td>3.8.13 Unicode and font</td>
     <td>MUST support Roboto 2 in addition to existing requirements.</td>
  </tr>
+  <tr>
+    <td>3.11 Text-To-Speech</td>
+ <td>Added Android automotive requirements.</td>
+ </tr>
  <tr>
     <td>3.12. TV Input Framework</td>
     <td>Android Television device implementations MUST support Television Input