Merge "Docs: NEW CHANGE#15 for Android automotive changes to cdd       Android automotive implementations do not support legacy       compatibility mode" 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 e3ee4d3..0e59cec 100644
--- a/src/compatibility/5.1/android-5.1-cdd.html
+++ b/src/compatibility/5.1/android-5.1-cdd.html
@@ -176,7 +176,7 @@
 
 <p class="toc_h3"><a href="#7_1_6_screen_technology">7.1.6. Screen Technology</a></p>
 
-<p class="toc_h3"><a href="#7_1_7_external_displays">7.1.7. External Displays</a></p>
+<p class="toc_h3"><a href="#7_1_7_external_displays">7.1.7. Secondary Displays</a></p>
 
 <p class="toc_h2"><a href="#7_2_input_devices">7.2. Input Devices</a></p>
 
@@ -404,7 +404,7 @@
 <p>All Android device implementations that do not fit into any of the above device
 types still MUST meet all requirements in this document to be Android 5.1
 compatible, unless the requirement is explicitly described to be only
-applicable to a specific Android device type. </p>
+applicable to a specific Android device type from above.</p>
 
 <h2 id="2_1_device_configurations">2.1 Device Configurations</h2>
 
@@ -420,6 +420,7 @@
     <th>Handheld</th>
     <th>Television</th>
     <th>Watch</th>
+    <th>Automotive</th>
     <th>Other</th>
  </tr>
  <tr>
@@ -430,6 +431,7 @@
     <td>MUST</td>
     <td></td>
     <td></td>
+    <td></td>
  </tr>
  <tr>
     <td>Touchscreen </td>
@@ -437,6 +439,7 @@
     <td>MUST</td>
     <td></td>
     <td>MUST</td>
+    <td></td>
     <td>SHOULD</td>
  </tr>
  <tr>
@@ -445,6 +448,7 @@
     <td>MUST</td>
     <td>SHOULD </td>
     <td>MUST</td>
+    <td>MUST</td>
     <td>SHOULD</td>
  </tr>
  <tr>
@@ -454,6 +458,7 @@
     <td>SHOULD</td>
     <td></td>
     <td>SHOULD</td>
+    <td></td>
     <td>SHOULD</td>
  </tr>
  <tr>
@@ -462,6 +467,7 @@
     <td>SHOULD</td>
     <td></td>
     <td></td>
+    <td>SHOULD</td>
     <td></td>
  </tr>
  <tr>
@@ -472,6 +478,7 @@
     <td> MUST</td>
     <td></td>
     <td>SHOULD</td>
+    <td>SHOULD</td>
  </tr>
  <tr>
     <td>Wi-Fi Direct</td>
@@ -479,6 +486,7 @@
     <td>SHOULD</td>
     <td>SHOULD</td>
     <td></td>
+    <td></td>
     <td>SHOULD</td>
  </tr>
  <tr>
@@ -487,6 +495,7 @@
     <td>SHOULD</td>
     <td>MUST</td>
     <td>MUST</td>
+    <td>MUST</td>
     <td>SHOULD</td>
  </tr>
  <tr>
@@ -496,14 +505,16 @@
     <td>MUST</td>
     <td>SHOULD</td>
     <td>SHOULD</td>
+    <td>SHOULD</td>
  </tr>
  <tr>
-    <td>USB peripheral/ host mode</td>
+    <td>USB peripheral/host mode</td>
     <td><a href="#7_7_usb">7.7. USB</a></td>
     <td>SHOULD</td>
     <td></td>
     <td></td>
     <td>SHOULD</td>
+    <td>SHOULD</td>
  </tr>
  <tr>
     <td>Output</td>
@@ -513,6 +524,7 @@
     <td>MUST</td>
     <td></td>
     <td>MUST</td>
+    <td>MUST</td>
  </tr>
 </table>
 
@@ -930,9 +942,8 @@
 <h3 id="3_4_1_webview_compatibility">3.4.1. WebView Compatibility</h3>
 
 <div class="note">
-<p>The complete implementation of the android.webkit.Webview API MAY be provided
-on Android Watch devices but MUST be provided on all other types of device
-implementations.</p>
+<p>Android Watch devices MAY, but all other device implementations MUST provide
+a complete implementation of the android.webkit.Webview API.</p>
 </div>
 
 
@@ -973,9 +984,11 @@
 <h3 id="3_4_2_browser_compatibility">3.4.2. Browser Compatibility</h3>
 
 <div class="note">
-<p>Android Television and Watch Devices MAY omit a browser application, but MUST
-support the public intent patterns as described in <a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. All other types of device implementations MUST include a standalone Browser
-application for general user web browsing.</p>
+<p>Android Television, Watch, and Android Automotive implementations MAY omit a
+browser application, but MUST support the public intent patterns as described in
+<a href="#3_2_3_1_core_application_intents">section 3.2.3.1</a>. All other types
+of device implementations MUST include a standalone Browser application for
+general user web browsing.</p>
 </div>
 
 <p>The standalone Browser MAY be based on a browser technology other than WebKit.
@@ -1103,27 +1116,24 @@
  <tr>
     <td rowspan="10">small/normal</td>
     <td>120 dpi (ldpi)</td>
-    <td>16MB</td>
+    <td rowspan="2">32MB</td>
  </tr>
  <tr>
     <td>160 dpi (mdpi)</td>
-    <td></td>
  </tr>
  <tr>
     <td>213 dpi (tvdpi)</td>
-    <td>32MB</td>
+    <td rowspan="3">48MB</td>
  </tr>
  <tr>
     <td>240 dpi (hdpi)</td>
-    <td></td>
  </tr>
  <tr>
     <td>280 dpi (280dpi)</td>
-    <td>48MB</td>
  </tr>
  <tr>
     <td>320 dpi (xhdpi)</td>
-    <td>64MB</td>
+    <td>80MB</td>
  </tr>
  <tr>
     <td>400 dpi (400dpi)</td>
@@ -1144,19 +1154,18 @@
  <tr>
     <td rowspan="10">large</td>
     <td>120 dpi (ldpi)</td>
-    <td>16MB</td>
- </tr>
- <tr>
-    <td>160 dpi (mdpi)</td>
     <td>32MB</td>
  </tr>
  <tr>
+    <td>160 dpi (mdpi)</td>
+    <td>48MB</td>
+ </tr>
+ <tr>
     <td>213 dpi (tvdpi)</td>
-    <td>64MB</td>
+    <td rowspan="2">80MB</td>
  </tr>
  <tr>
     <td>240 dpi (hdpi)</td>
-    <td></td>
  </tr>
  <tr>
     <td>280 dpi (280dpi)</td>
@@ -1183,17 +1192,20 @@
     <td>512MB</td>
  </tr>
  <tr>
-    <td rowspan="9">xlarge</td>
+    <td rowspan="10">xlarge</td>
+    <td>120 dpi (ldpi)</td>
+    <td>48MB</td>
+ </tr>
+ <tr>
     <td>160 dpi (mdpi)</td>
-    <td>64MB</td>
+    <td>80MB</td>
  </tr>
  <tr>
     <td>213 dpi (tvdpi)</td>
-    <td>96MB</td>
+    <td rowspan="2">96MB</td>
  </tr>
  <tr>
     <td>240 dpi (hdpi)</td>
-    <td></td>
  </tr>
  <tr>
     <td>280 dpi (280dpi)</td>
@@ -1445,9 +1457,8 @@
 
 
 <p>Android includes support for color emoji characters. When Android device
-implementations include an IME, devices MUST provide an input method to the
-user for the Emoji characters defined in Unicode 6.1 [<a href="http://www.unicode.org/versions/Unicode6.1.0/">Resources, 38</a>]. All devices MUST be capable of rendering these emoji characters in color
-glyph.</p>
+implementations include an IME, devices SHOULD provide an input method to the
+user for the Emoji characters defined in Unicode 6.1 [<a href="http://www.unicode.org/versions/Unicode6.1.0/">Resources, 38</a>]. All devices MUST be capable of rendering these emoji characters in color glyph.</p>
 
 <p>Android includes support for Roboto 2 font with different
 weights&mdash;sans-serif-thin, sans-serif-light, sans-serif-medium, sans-serif-black,
@@ -1462,10 +1473,14 @@
 <p>Android includes features that allow security-aware applications to perform
 device administration functions at the system level, such as enforcing password
 policies or performing remote wipe, through the Android Device Administration
-API [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>]. Device implementations MUST provide an implementation of the
-DevicePolicyManager class [<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">Resources, 40</a>]. Device implementations that include support for lock screen MUST support the
-full range of device administration policies defined in the Android SDK
-documentation [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>] and report the platform feature android.software.device_admin.</p>
+API [<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>].
+Device implementations MUST provide an implementation of the DevicePolicyManager class
+[<a href="http://developer.android.com/reference/android/app/admin/DevicePolicyManager.html">Resources, 40</a>].
+Device implementations that include support for PIN (numeric) or PASSWORD
+(alphanumeric) based lock screens MUST support the full range of device
+administration policies defined in the Android SDK documentation
+[<a href="http://developer.android.com/guide/topics/admin/device-admin.html">Resources, 39</a>]
+and report the platform feature android.software.device_admin.</p>
 
 <p>Device implementations MAY have a preinstalled application performing device
 administration functions but this application MUST NOT be set out-of-the box as
@@ -1478,20 +1493,29 @@
 navigate their devices more easily. In addition, Android provides platform APIs
 that enable accessibility service implementations to receive callbacks for user
 and system events and generate alternate feedback mechanisms, such as
-text-to-speech, haptic feedback, and trackball/d-pad navigation [<a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">Resources, 42</a>]. Device implementations MUST provide an implementation of the Android
-accessibility framework consistent with the default Android implementation.
-Device implementations MUST meet the following requirements:</p>
+text-to-speech, haptic feedback, and trackball/d-pad navigation [<a href="http://developer.android.com/reference/android/accessibilityservice/AccessibilityService.html">Resources, 42</a>].</p>
+
+<p>Device implementations include the following requirements:</p>
 
 <ul>
-  <li>MUST support third-party accessibility service implementations through the
-android.accessibilityservice APIs [<a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">Resources, 43</a>].</li>
-  <li>MUST generate AccessibilityEvents and deliver these events to all registered
+<li>Android Automotive implementations SHOULD provide an implementation of the
+Android accessibility framework consistent with the default Android
+implementation.</li>
+<li>Device implementations (Android Automotive excluded) MUST provide an
+implementation of the Android accessibility framework consistent with the
+default Android implementation.</li>
+<li>Device implementations (Android Automotive excluded) MUST support
+third-party accessibility service implementations through the
+android.accessibilityservice APIs
+[<a href="http://developer.android.com/reference/android/view/accessibility/package-summary.html">Resources, 43</a>]</li>
+<li>Device implementations (Android Automotive excluded) MUST generate
+AccessibilityEvents and deliver these events to all registered
 AccessibilityService implementations in a manner consistent with the default
-Android implementation.</li>
-  <li>Unless an Android Watch device with no audio output, device implementations
-MUST provide a user-accessible mechanism to enable and disable accessibility
-services, and MUST display this interface in response to the
-android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS intent.</li>
+Android implementation</li>
+<li> Device implementations (Android Automotive and Android Watch devices with
+no audio output excluded), MUST provide a user-accessible mechanism to enable
+and disable accessibility services, and MUST display this interface in response
+to the android.provider.Settings.ACTION_ACCESSIBILITY_SETTINGS intent.</li>
 </ul>
 
 <p>Additionally, device implementations SHOULD provide an implementation of an
@@ -2421,8 +2445,9 @@
   <li><strong>dots per inch (dpi)</strong>. The number of pixels encompassed by a linear horizontal or vertical span of
 1&rdquo;. Where dpi values are listed, both horizontal and vertical dpi must fall
 within the range.</li>
-  <li><strong>aspect ratio</strong>. The ratio of the longer dimension of the screen to the shorter dimension. For
-example, a display of 480x854 pixels would be 854/480 = 1.779, or roughly &ldquo;16:9&rdquo;.</li>
+  <li><strong>aspect ratio</strong>. The ratio of the pixels of the longer dimension
+  to the shorter dimension of the screen. For example, a display of 480x854 pixels
+  would be 854/480 = 1.779, or roughly &ldquo;16:9&rdquo;.</li>
   <li><strong>density-independent pixel (dp)</strong> The virtual pixel unit normalized to a 160 dpi screen, calculated as: pixels =
 dps * (density/160).</li>
 </ul>
@@ -2643,7 +2668,7 @@
 15% tolerance.</li>
 </ul>
 
-<h3 id="7_1_7_external_displays">7.1.7. External Displays</h3>
+<h3 id="7_1_7_external_displays">7.1.7. Secondary Displays</h3>
 
 
 <p>Android includes support for secondary display to enable media sharing
@@ -2660,8 +2685,8 @@
 <h3 id="7_2_1_keyboard">7.2.1. Keyboard</h3>
 
 <div class="note">
-<p>Android Watch devices MAY but other type of device implementations MUST
-implement a soft keyboard.</p>
+<p>Android Watch and Android Automotive implementations MAY implement a soft
+keyboard. All other device implementations MUST implement a soft keyboard and:</p>
 </div>
 
 
@@ -2708,7 +2733,7 @@
 
 <p>The Home, Recents, and Back functions (mapped to the key events KEYCODE_HOME,
 KEYCODE_APP_SWITCH, KEYCODE_BACK, respectively) are essential to the Android
-navigation paradigm and therefore;</p>
+navigation paradigm and therefore:</p>
 
 <ul>
   <li>Android Handheld device implementations MUST provide the Home, Recents, and
@@ -2717,6 +2742,8 @@
 functions.</li>
   <li>Android Watch device implementations MUST have the Home function available to
 the user, and the Back function except for when it is in UI_MODE_TYPE_WATCH.</li>
+  <li>Android Automotive implementations MUST provide the Home function and MAY
+provide Back and Recent functions.</li>
   <li>All other types of device implementations MUST provide the Home and Back
 functions.</li>
 </ul>
@@ -3076,8 +3103,10 @@
 
 <ul>
   <li>MUST implement and report TYPE_ACCELEROMETER sensor [<a href="http://developer.android.com/reference/android/hardware/Sensor.html#TYPE_ACCELEROMETER">Resources, 78</a>].</li>
-  <li>MUST be able to report events up to a frequency of at least 100 Hz and SHOULD
-report events up to at least 200 Hz.</li>
+  <li>MUST be able to report events up to a frequency of at least 50 Hz for
+  Android Watch devices as such devices have a stricter power constraint and
+  100 Hz for all other device types.</li>
+  <li>SHOULD report events up to at least 200 Hz.</li>
   <li>MUST comply with the Android sensor coordinate system as detailed in the
 Android APIs [<a href="http://developer.android.com/reference/android/hardware/SensorEvent.html">Resources, 74</a>].</li>
   <li>MUST be capable of measuring from freefall up to four times the gravity (4g) or
@@ -3160,8 +3189,10 @@
 TYPE_GYROSCOPE_UNCALIBRATED sensor. Existing and new Android devices are
 strongly encouraged to implement the SENSOR_TYPE_GYROSCOPE_UNCALIBRATED sensor.</li>
   <li>MUST be capable of measuring orientation changes up to 1,000 degrees per second.</li>
-  <li>MUST be able to report events up to a frequency of at least 100 Hz and SHOULD
-report events up to at least 200 Hz.</li>
+  <li>MUST be able to report events up to a frequency of at least 50 Hz for
+  Android Watch devices as such devices have a stricter power constraint and 
+  100 Hz for all other device types.</li>
+  <li>SHOULD report events up to at least 200 Hz.</li>
   <li>MUST have a resolution of 12-bits or more and SHOULD have a resolution of
 16-bits or more.</li>
   <li>MUST be temperature compensated.</li>
@@ -3781,11 +3812,12 @@
 expose content from both storage paths transparently through Android&rsquo;s media
 scanner service and android.provider.MediaStore.</p>
 
-<p>Regardless of the form of shared storage used, device implementations MUST
-provide some mechanism to access the contents of shared storage from a host
-computer, such as USB mass storage (UMS) or Media Transfer Protocol (MTP).
-Device implementations MAY use USB mass storage, but SHOULD use Media Transfer
-Protocol. If the device implementation supports Media Transfer Protocol, it:</p>
+<p>Regardless of the form of shared storage used, if the device implementation
+has a USB port with USB peripheral mode support, it MUST provide some mechanism
+to access the contents of shared storage from a host computer. Device
+implementations MAY use USB mass storage, but SHOULD use Media Transfer Protocol
+to satisfy this requirement. If the device implementation supports Media
+Transfer Protocol, it:</p>
 
 <ul>
   <li>SHOULD be compatible with the reference Android MTP host, Android File Transfer
@@ -3794,10 +3826,6 @@
   <li>SHOULD report a USB interface name of 'MTP'.</li>
 </ul>
 
-<p>If the device implementation lacks USB ports, it MUST provide a host computer
-with access to the contents of shared storage by some other means, such as a
-network file system.</p>
-
 <h2 id="7_7_usb">7.7. USB</h2>
 
 
@@ -3818,8 +3846,7 @@
 the port at bottom. Existing and new Android devices are <strong>very strongly encouraged to meet these requirements</strong> so they will be able to upgrade to future platform releases.</li>
   <li>It MUST allow a USB host connected with the Android device to access the
 contents of the shared storage volume using either USB mass storage or Media
-Transfer Protocol, if the device reports the android.hardware.feature.output
-feature or the android.hardware.camera feature.</li>
+Transfer Protocol.</li>
   <li>It SHOULD implement the Android Open Accessory (AOA) API and specification as
 documented in the Android SDK documentation, and if it is an Android Handheld
 device it MUST implement the AOA API. Device implementations implementing the
@@ -3857,7 +3884,8 @@
 <h3 id="7_8_1_microphone">7.8.1. Microphone</h3>
 
 <div class="note">
-<p>Android Handheld and Watch devices MUST include a microphone.</p>
+<p>Android Handheld, Watch, and Automotive implementations MUST include a
+microphone.</p>
 </div>
 
 
@@ -4183,8 +4211,9 @@
 </div>
 
 
-<p>If the device implementation has a lock screen, the device MUST support
-full-disk encryption of the application private data, (/data partition) as well
+<p>If the device implementation supports a lock screen with PIN (numeric) or
+PASSWORD (alphanumeric), the device MUST support full-disk encryption of the
+application private data (/data partition), as well
 as the SD card partition if it is a permanent, non-removable part of the device
 [<a href="http://source.android.com/devices/tech/security/encryption/index.html">Resources, 107</a>]. For devices supporting full-disk encryption, the full-disk encryption SHOULD
 be enabled all the time after the user has completed the out-of-box experience.
@@ -4275,14 +4304,20 @@
 approaches will satisfy this requirement:</p>
 
 <ul>
-  <li>Over-the-air (OTA) downloads with offline update via reboot</li>
+  <li>&ldquo;Over-the-air (OTA)&rdquo; downloads with offline update via reboot</li>
   <li>&ldquo;Tethered&rdquo; updates over USB from a host PC</li>
   <li>&ldquo;Offline&rdquo; updates via a reboot and update from a file on removable storage</li>
 </ul>
 
 <p>However, if the device implementation includes support for an unmetered data
-connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile, the
-device MUST support Over-the-air download with offline update via reboot.</p>
+connection such as 802.11 or Bluetooth PAN (Personal Area Network) profile:</p>
+
+<ul>
+<li>Android Automotive implementations SHOULD support OTA downloads with offline
+update via reboot.</li>
+<li>All other device implementations MUST support OTA downloads with offline
+update via reboot.</li>
+</ul>
 
 <p>The update mechanism used MUST support updates without wiping user data. That
 is, the update mechanism MUST preserve application private data and application
@@ -4357,8 +4392,9 @@
  </tr>
  <tr>
     <td>3.4.2. Browser compatibility</td>
-    <td>Android Television and Watch Devices MAY omit a browser application, but all
-other types of device implementations MUST include one.</td>
+    <td>Android Television, Watch, and Android Automotive implementations MAY
+    omit a browser application, but all other types of device implementations
+    MUST include one.</td>
  </tr>
  <tr>
     <td>3.7. Runtime compatibility</td>
@@ -4401,12 +4437,16 @@
     <td>Optional for Android Watch devices. Required for all other device types.</td>
  </tr>
  <tr>
-    <td>3.8.13 Unicode and font</td>
-    <td>MUST support Roboto 2 in addition to existing requirements.</td>
+    <td>3.8.13. Unicode and font</td>
+    <td>MUST support Roboto 2 in addition to existing requirements. Added Android automotive requirements.</td>
  </tr>
-  <tr>
-    <td>3.11 Text-To-Speech</td>
- <td>Added Android automotive requirements.</td>
+ <tr>
+    <td>3.10. Accessibility</td>
+    <td>Added Android automotive 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>
@@ -4488,6 +4528,10 @@
     <td>7.1.7. External Displays</td>
     <td>Moved part of section to section 5.8. Secure Media.</td>
  </tr>
+ <tr>
+    <td>7.2.1. Keyboard</td>
+    <td>Added Android Automotive requirements.</td>
+ </tr>
   <tr>
     <td>7.2 Input Devices</td>
     <td>Added general intro statement.</td>
@@ -4497,11 +4541,12 @@
     <td>Android Television devices MUST support D-pad. </td>
  </tr>
  <tr>
-    <td>7.2.3. Navigation keys</td>
-    <td>Included language for support across different device types. </td>
+    <td>7.2.3. Navigation Keys</td>
+    <td>Included language for support across different device types. Added
+    Android Automotive requirements.</td>
  </tr>
  <tr>
-    <td>7.2.4. Touchscreen input</td>
+    <td>7.2.4. Touchscreen Input</td>
     <td>Android Watch devices MUST support touchscreen input. </td>
  </tr>
  <tr>
@@ -4591,9 +4636,13 @@
 micro-USB port. Updated requirements for Host and Peripheral mode. </td>
  </tr>
  <tr>
-    <td>7.8.1. Audio</td>
+    <td>7.8. Audio</td>
     <td>Moved microphone section here. Added requirements for Audio Output and Audio
-Analog ports. </td>
+Analog ports.</td>
+ </tr>
+ <tr>
+    <td>7.8.1. Microphone</td>
+    <td>Added Android Automotive requirements.</td>
  </tr>
  <tr>
     <td>8. Performance Compatibility</td>
@@ -4626,7 +4675,9 @@
  <tr>
     <td>11. Updatable Software</td>
     <td>If a device supports 802.11 or Bluetooth PAN (Personal Area Network) profile,
-then it MUST support Over-the-air download with offline update via reboot.</td>
+then it MUST support over-the-air (OTA) download with offline update via reboot. Clarified
+the OTA download requirement is allowed but not mandatory for Android Automotive
+implementations.</td>
  </tr>
  <tr>
     <td>14. Resources</td>