Merge "Docs: Adding ART references to Dalvik" into lmp-dev
diff --git a/Doxyfile b/Doxyfile
index c01ff14..04f62f1 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -925,7 +925,7 @@
 # If a relative path is entered the value of OUTPUT_DIRECTORY will be 
 # put in front of it. If left blank `html' will be used as the default path.
 
-HTML_OUTPUT            = reference
+HTML_OUTPUT            = halref
 
 # The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
 # each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
@@ -944,13 +944,13 @@
 # have to redo this when upgrading to a newer version of doxygen or when 
 # changing the value of configuration settings such as GENERATE_TREEVIEW!
 
-HTML_HEADER            = 
+HTML_HEADER            = ./docs/source.android.com/hal_header.html 
 
 # The HTML_FOOTER tag can be used to specify a personal HTML footer for 
 # each generated HTML page. If it is left blank doxygen will generate a 
 # standard footer.
 
-HTML_FOOTER            = 
+HTML_FOOTER            = ./docs/source.android.com/hal_footer.html 
 
 # The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
 # style sheet that is used by each HTML page. It can be used to 
@@ -969,7 +969,7 @@
 # robust against future updates. Doxygen will copy the style sheet file to 
 # the output directory.
 
-HTML_EXTRA_STYLESHEET  = 
+HTML_EXTRA_STYLESHEET  = ./docs/source.android.com/hal_doxygen.css
 
 # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 
 # other source files which should be copied to the HTML output directory. Note 
@@ -994,7 +994,7 @@
 # the colors in the HTML output. For a value of 0 the output will use 
 # grayscales only. A value of 255 will produce the most vivid colors.
 
-HTML_COLORSTYLE_SAT    = 100
+HTML_COLORSTYLE_SAT    = 0
 
 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
 # the luminance component of the colors in the HTML output. Values below 
@@ -1185,7 +1185,7 @@
 # navigation tree you can set this option to NO if you already set 
 # GENERATE_TREEVIEW to YES.
 
-DISABLE_INDEX          = NO
+DISABLE_INDEX          = YES
 
 # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
 # structure should be generated to display hierarchical information. 
@@ -1197,7 +1197,7 @@
 # Since the tree basically has the same information as the tab index you 
 # could consider to set DISABLE_INDEX to NO when enabling this option.
 
-GENERATE_TREEVIEW      = NO
+GENERATE_TREEVIEW      = YES
 
 # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
 # (range [0,1..20]) that doxygen will group on one line in the generated HTML 
diff --git a/DoxygenLayout.xml b/DoxygenLayout.xml
index f264386..4b6ad40 100644
--- a/DoxygenLayout.xml
+++ b/DoxygenLayout.xml
@@ -2,7 +2,7 @@
   <!-- Generated by doxygen 1.8.3.1 -->
   <!-- Navigation index tabs for HTML output -->
   <navindex>
-    <tab type="mainpage" visible="yes" title="" intro="fdsfds"/>
+    <tab type="mainpage" visible="yes" title="" intro=""/>
     <tab type="pages" visible="yes" title="" intro=""/>
     <tab type="modules" visible="yes" title="" intro=""/>
     <tab type="namespaces" visible="yes" title="">
@@ -18,7 +18,7 @@
       <tab type="filelist" visible="yes" title="" intro=""/>
       <tab type="globals" visible="yes" title="" intro=""/>
     </tab>
-        <tab type="user" url="/devices/index.html" title="Back to source.android.com">
+        <tab type="user" url="/devices/tech/index.html" title="Devices on source.android.com">
     </tab>
   </navindex>
 
diff --git a/hal_doxygen.css b/hal_doxygen.css
new file mode 100644
index 0000000..6e63946
--- /dev/null
+++ b/hal_doxygen.css
@@ -0,0 +1,35 @@
+#header {
+  padding: 1.2em 0 0.2em 0;
+  margin: 10px 120px;
+}
+
+a:hover,
+acronym:hover {
+  color: #7aa1b0 !important; }
+
+a:link, a:visited {
+  color: #258aaf;
+  text-decoration: none;
+}
+
+a:focus, a:hover, a:active {
+  color: #33b5e5;
+  text-decoration: none;
+}
+
+a.toptab {
+  color: #333;
+  font-size: 16px;
+}
+
+a.devices {
+  color: #F80;
+  font-size: 16px;
+}
+
+hr.light {
+    border: 0;
+    height: 0;
+    border-top: 1px solid rgba(0, 0, 0, 0.1);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+}
diff --git a/hal_footer.html b/hal_footer.html
new file mode 100644
index 0000000..2ad5ca3
--- /dev/null
+++ b/hal_footer.html
@@ -0,0 +1,22 @@
+<!-- HTML footer for doxygen 1.8.4-->
+<!-- start footer part -->
+<!--BEGIN GENERATE_TREEVIEW-->
+<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
+  <ul>
+    $navpath
+    <li class="footer">$generatedby
+    <a href="/index.html">
+    <img class="footer" src="/images/Android_Robot_100.png" alt="Android"/></a> $doxygenversion </li>
+  </ul>
+</div>
+<!--END GENERATE_TREEVIEW-->
+<!--BEGIN !GENERATE_TREEVIEW-->
+<hr class="footer"/><address class="footer"><small>
+$generatedby &#160;<a href="/index.html">
+<img class="footer"
+src="/images/Android_Robot_100.png" alt="Android"/>
+</a> $doxygenversion
+</small></address>
+<!--END !GENERATE_TREEVIEW-->
+</body>
+</html>
diff --git a/hal_header.html b/hal_header.html
new file mode 100644
index 0000000..dc4e671
--- /dev/null
+++ b/hal_header.html
@@ -0,0 +1,46 @@
+<!-- HTML header for doxygen 1.8.4-->
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
+<meta http-equiv="X-UA-Compatible" content="IE=9"/>
+<meta name="generator" content="Doxygen $doxygenversion"/>
+<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
+<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
+<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
+<script type="text/javascript" src="//www.gstatic.com/external_hosted/source_android_com/sac_doxygen_jquery.js"></script>
+<script type="text/javascript" src="$relpath^dynsections.js"></script>
+$treeview
+$search
+$mathjax
+<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
+$extrastylesheet
+<script type="text/javascript">
+  var _gaq = _gaq || [];
+  _gaq.push(['_setAccount', 'UA-45455297-1']);
+  _gaq.push(['_trackPageview']);
+
+  (function() {
+    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+  })();
+</script>
+</head>
+<body>
+<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
+
+    <div id="header">
+            <table width=80%>
+              <tr>
+                <td><a href="/index.html"><img src="/assets/images/sac_logo.png" width="123" height="25" alt="Android Developers" /></td>
+                <td><a class=toptab href="/source/index.html">Source</a></td>
+                <td><a class=devices href="/devices/index.html">Devices</a></td>
+                <td><a class=toptab href="/accessories/index.html">Accessories</a></td>
+                <td><a class=toptab href="/compatibility/index.html">Compatibility</a></td>
+                <td width=20%>$searchbox</td>
+              </tr>
+            </table>
+  </div>
+<hr class=light>
+<!-- end header part -->
diff --git a/src/accessories/accessories_toc.cs b/src/accessories/accessories_toc.cs
index d1badbe..95748f2 100644
--- a/src/accessories/accessories_toc.cs
+++ b/src/accessories/accessories_toc.cs
@@ -34,8 +34,17 @@
           <li><a href="<?cs var:toroot ?>accessories/aoa.html">Version 1.0</a></li>
         </ul>
       </li>
-      <li><a href="<?cs var:toroot ?>accessories/audio.html">Building Audio Accessories</a></li>
-      <li><a href="<?cs var:toroot ?>accessories/custom.html">Building Custom Accessories</a></li>
+      <li class="nav-section">
+        <div class="nav-section-header">
+          <a href="<?cs var:toroot ?>accessories/audio.html">
+            <span class="en">Audio Accessories</span>
+          </a>
+        </div>
+        <ul>
+          <li><a href="<?cs var:toroot ?>accessories/headset-spec.html">Headset specification</a></li>
+        </ul>
+      </li>
+      <li><a href="<?cs var:toroot ?>accessories/custom.html">Custom Accessories</a></li>
   </li>
   <!-- End Accessories -->
 </ul>
diff --git a/src/accessories/headset-spec.jd b/src/accessories/headset-spec.jd
new file mode 100644
index 0000000..88b6023
--- /dev/null
+++ b/src/accessories/headset-spec.jd
@@ -0,0 +1,678 @@
+page.title=Wired audio headset specification
+@jd:body
+
+<!--
+    Copyright 2014 The Android Open Source Project
+
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+
+        http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<div id="qv-wrapper">
+  <div id="qv">
+    <h2>In this document</h2>
+    <ol id="auto-toc">
+    </ol>
+  </div>
+</div>
+
+<p><em>Version 1.0</em></p>
+
+<p>This document specifies the requirements for headsets and mobile devices to
+function uniformly across the Android ecosystem. It is separated into two
+sections beginning with the specifications for the headset
+accessory followed by the specifications for the mobile device.</p>
+
+<h2 id=headset_accessory_plug_specifications>Headset Accessory (Plug) Specifications</h2>
+
+<p>The requirements in the following section apply to the headset accessory.</p>
+
+<h2 id=functions>Functions</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Accessory Support</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Stereo Audio Out</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Audio in (Mic)</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Ground</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+</table>
+
+<h2 id=control-function_mapping>Control-Function Mapping</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Control Function</strong></p>
+</th>
+    <th>
+<p><strong>Accessory Support</strong></p>
+</th>
+    <th>
+<p><strong>Description</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Function A</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Play/pause/hook (Short Press), Trigger Assist (Long Press), Next (double press)</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function B</p>
+</td>
+    <td>
+<p>Optional</p>
+</td>
+    <td>
+<p>Vol+</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function C</p>
+</td>
+    <td>
+<p>Optional</p>
+</td>
+    <td>
+<p>Vol-</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function D</p>
+</td>
+    <td>
+<p>Optional</p>
+</td>
+    <td>
+<p>Reserved (Nexus devices will use this reserved function to launch Google Now
+voice search)</p>
+</td>
+ </tr>
+</table>
+
+<p><strong>Assign functions to buttons as follows</strong>:</p>
+
+<ul>
+  <li> All one-button headsets must implement Function A.
+  <li> Headsets with multiple buttons must implement functions according to the
+following pattern:
+  <ul>
+    <li> 2 functions: A and D
+    <li> 3 functions: A, B, C
+    <li> 4 functions: A, B, C, D
+  </ul>
+</ul>
+
+<h2 id=mechanical>Mechanical</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Accessory Support</strong></p>
+</th>
+    <th>
+<p><strong>Notes</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>4 conductor 3.5mm plug</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Ref: EIAJ-RC5325A standard</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>CTIA pinout order (LRGM)</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Except in regions with legal requirements for OMTP pinout</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>OMTP pinout order  (LRMG)</p>
+</td>
+    <td>
+<p>Optional</p>
+</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td>
+<p>Microphone</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Must not be obstructed when operating headset controls</p>
+</td>
+ </tr>
+</table>
+
+<h2 id=electrical>Electrical</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Accessory Support</strong></p>
+</th>
+    <th>
+<p><strong>Description</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Ear speaker impedance</p>
+</td>
+    <td>
+<p><strong>16 ohms or higher</strong></p>
+</td>
+    <td>
+<p>Recommend 32 - 300 ohms</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Mic DC resistance</p>
+</td>
+    <td>
+<p><strong>1000 ohms or higher</strong></p>
+</td>
+    <td>
+<p>Mic characteristics must be compliant with section 5.4 “Audio Recording” of
+current Android Compatibility Definition Document (CDD)</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Control Function Equivalent impedance*</p>
+
+<p>*Total impedance from positive mic terminal to GND when button is pressed with
+2.2 V mic bias applied through 2.2 kOhm resistor</p>
+</td>
+    <td>
+<p><strong>0 ohm</strong></p>
+</td>
+    <td>
+<p>[Function A]  Play/Pause/Hook</p>
+</td>
+ </tr>
+ <tr>
+    <td></td>
+    <td>
+<p><strong>240 ohm</strong> +/- 1% resistance</p>
+</td>
+    <td>
+<p>[Function B]</p>
+</td>
+ </tr>
+ <tr>
+    <td></td>
+    <td>
+<p><strong>470 ohm</strong> +/- 1% resistance</p>
+</td>
+    <td>
+<p>[Function C] </p>
+</td>
+ </tr>
+ <tr>
+    <td></td>
+    <td>
+<p><strong>135 ohm</strong> +/- 1% resistance</p>
+</td>
+    <td>
+<p>[Function D]</p>
+</td>
+ </tr>
+</table>
+
+<h2 id=reference_headset_test_circuit_1>Reference Headset Test Circuit 1</h2>
+
+<img src="images/headset-circuit1.png" alt="Reference Headset Test Circuit 1" />
+<p class="img-caption"><strong>Figure 1.</strong> Reference headset test circuit 1</p>
+
+<p class="note"><strong>Note:</strong> Four-segment plug shows CTIA pinout. For OMTP pinout, please swap MIC and
+GND segments</strong></p>
+
+<h2 id=reference_headset_test_circuit_2>Reference Headset Test Circuit 2</h2>
+
+<img src="images/headset-circuit2.png" alt="Reference Headset Test Circuit 2" />
+<p class="img-caption"><strong>Figure 2.</strong> Reference headset test circuit 2</p>
+
+<p><strong>Note</strong>: The second reference circuit above illustrates how the actual resistor values
+(R1 - R4) will change based on the microphone capsule resistance to achieve the
+equivalent impedance values as required by the specification. The example above
+assumes a 5 kOhm microphone impedance. Therefore, as an example, to achieve an
+equivalent R4 impedance of 135 Ohm, the actual R4 resistor value needs to be
+139 Ohms.</p>
+
+<h2 id=mobile_device_jack_specifications>Mobile Device (Jack) Specifications</h2>
+
+<p>The requirements in the following section apply to the 3.5 mm jack on Android
+mobile devices.</p>
+
+<p><strong>Headset Jack Functions</strong></p>
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Device Support</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Stereo Audio Out</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Audio in (Mic)</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Ground</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+ </tr>
+</table>
+
+<h2 id=software_mapping>Software mapping</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Device Support</strong></p>
+</th>
+    <th>
+<p><strong>Description</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Function A control event </p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>input event KEY_MEDIA</p>
+
+<p>Android key  KEYCODE_HEADSETHOOK</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function D control event</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>input event KEY_VOICECOMMAND</p>
+
+<p>Android key KEYCODE_VOICE_ASSIST</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function B control event</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>input event KEY_VOLUMEUP</p>
+
+<p>Android key  VOLUME_UP</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Function C control event</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>input event KEY_VOLUMEDOWN</p>
+
+<p>Android key  VOLUME_DOWN</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset insertion detection</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>input event SW_JACK_PHYSICAL_INSERT 7</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset type detection</p>
+</td>
+    <td>
+<p><strong>Mic</strong></p>
+</td>
+    <td>
+<p>input event SW_MICROPHONE_INSERT 4</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset type detection</p>
+</td>
+    <td>
+<p><strong>No Mic</strong></p>
+</td>
+    <td>
+<p>input event SW_HEADPHONE_INSERT 2</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset speaker impedance</p>
+</td>
+    <td>
+<p><strong>Required Headphone (low)</strong></p>
+</td>
+    <td>
+<p>Failure mode is to indicate headphones so that limitation would be on</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset speaker impedance</p>
+</td>
+    <td>
+<p><strong>Required Line In (high)</strong></p>
+</td>
+    <td>
+<p>input event SW_LINEOUT_INSERT 6</p>
+</td>
+ </tr>
+</table>
+
+<h2 id=mechanical11>Mechanical</h2>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Device Support</strong></p>
+</th>
+    <th>
+<p><strong>Description</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>4 conductor 3.5mm jack</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td>
+<p>CTIA pinout order (LRGM)</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>3 Pin & Mono Plug Compatible</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>OMTP pinout order  (LRMG)</p>
+</td>
+    <td>
+<p>Optional but <strong>Strongly Recommended</strong></p>
+</td>
+    <td></td>
+ </tr>
+ <tr>
+    <td>
+<p>Headset detect sequence</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Plug insert notification must only be triggered after all contacts on plug are
+touching their relevant segments. This will prevent unreliable headset
+detection due to slow insertion. </p>
+</td>
+ </tr>
+</table>
+
+<h2 id=electrical12>Electrical</h2>
+
+<h3 id=general>General</h3>
+
+<table>
+ <tr>
+    <th>
+<p><strong>Function</strong></p>
+</th>
+    <th>
+<p><strong>Device Support</strong></p>
+</th>
+    <th>
+<p><strong>Notes</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p>Minimum output voltage drive capacity </p>
+</td>
+    <td>
+<p>150mV </p>
+</td>
+    <td>
+<p>&gt;= 150mV on 32 ohm</p>
+
+<p>Test conditions: EN50332-2</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Mic bias resistance </p>
+</td>
+    <td>
+<p>Required</p>
+</td>
+    <td>
+<p>Flexible on detection method used and microphone bias resistor selection.
+Require that all button resistance value ranges specified below be detected and
+related to their respective function</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>Mic bias voltage</p>
+</td>
+    <td>
+<p>1.8V - 2.9V</p>
+</td>
+    <td>
+<p>To guarantee compatibility to common microphone capsules.</p>
+</td>
+ </tr>
+</table>
+
+<h3 id=function_impedance_and_threshold_detection>Function Impedance and Threshold Detection</h3>
+
+<p>Devices must detect the following resistor ladder on the accessories. The
+accessories will be tested to the standardized circuit diagram in the diagram
+illustrated earlier (Reference Headset Test Circuit) where the total impedance
+is measured from MIC terminal to GND when a button is pressed with 2.2V mic
+bias applied through 2.2 kOhm resistor. This is the same effective resistance
+as the button detection circuit with the microphone in parallel with the button
+resistor.</p>
+<table>
+ <tr>
+    <th>
+<p><strong>Button Impedance Level</strong></p>
+</th>
+    <th>
+<p><strong>Device Support</strong></p>
+</th>
+    <th>
+<p><strong>Notes</strong></p>
+</th>
+ </tr>
+ <tr>
+    <td>
+<p><strong>70 ohm or less</strong></p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>[Function A]</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><strong>110 - 180 ohm </strong></p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>[Function D]</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><strong>210 - 290 ohm</strong></p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>[Function B]</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><strong>360 - 680 ohm </strong></p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>[Function C]</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p><strong>Headset speaker impedance level</strong></p>
+</td>
+    <td></td>
+    <td></td>
+ </tr>
+ <tr>
+    <td>
+<p>Low Threshold Detection</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Headphone (low) &lt; 1 Kohm</p>
+</td>
+ </tr>
+ <tr>
+    <td>
+<p>High Threshold Detection</p>
+</td>
+    <td>
+<p><strong>Required</strong></p>
+</td>
+    <td>
+<p>Line In (high) &gt; 5 Kohm</p>
+</td>
+ </tr>
+</table>
diff --git a/src/accessories/images/headset-circuit1.png b/src/accessories/images/headset-circuit1.png
new file mode 100644
index 0000000..c69df98
--- /dev/null
+++ b/src/accessories/images/headset-circuit1.png
Binary files differ
diff --git a/src/accessories/images/headset-circuit2.png b/src/accessories/images/headset-circuit2.png
new file mode 100644
index 0000000..67bd5b4
--- /dev/null
+++ b/src/accessories/images/headset-circuit2.png
Binary files differ
diff --git a/src/devices/audio.jd b/src/devices/audio.jd
index 1b85d5e..660ec7e 100644
--- a/src/devices/audio.jd
+++ b/src/devices/audio.jd
@@ -78,7 +78,7 @@
     and that you must implement to have your audio hardware function correctly. The audio HAL
     interfaces are located in
 <code>hardware/libhardware/include/hardware</code>. See <a
-href="http://source.android.com/devices/reference/audio_8h_source.html">audio.h</a> for additional details.
+href="{@docRoot}devices/halref/audio_8h_source.html">audio.h</a> for additional details.
   </dd>
   <dt>
     Kernel Driver
diff --git a/src/devices/devices_toc.cs b/src/devices/devices_toc.cs
index 52363a5..7f513f1 100644
--- a/src/devices/devices_toc.cs
+++ b/src/devices/devices_toc.cs
@@ -293,7 +293,7 @@
 
       <li class="nav-section">
         <div class="nav-section-header empty">
-          <a href="<?cs var:toroot ?>devices/reference/files.html">
+          <a href="<?cs var:toroot ?>devices/halref/index.html">
             <span class="en">HAL File Reference</span>
           </a>
         </div>
diff --git a/src/devices/sensors/hal-interface.jd b/src/devices/sensors/hal-interface.jd
index 5c232fa..7feadf2 100644
--- a/src/devices/sensors/hal-interface.jd
+++ b/src/devices/sensors/hal-interface.jd
@@ -24,7 +24,7 @@
   </div>
 </div>
 
-<p>The HAL interface, declared in <a href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a>, represents the interface between the Android <a href="sensor-stack.html#framework">framework</a> and the hardware-specific software. A HAL implementation must define each
+<p>The HAL interface, declared in <a href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a>, represents the interface between the Android <a href="sensor-stack.html#framework">framework</a> and the hardware-specific software. A HAL implementation must define each
   function declared in sensors.h. The main functions are:</p>
 <ul>
   <li><code>get_sensors_list</code> - Returns the list of all sensors. </li>
@@ -47,7 +47,7 @@
   <li><code>sensor_t</code></li>
   <li><code>sensors_event_t</code></li>
 </ul>
-<p>In addition to the sections below, see <a href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> for more information on those types.</p>
+<p>In addition to the sections below, see <a href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> for more information on those types.</p>
 <h2 id="get_sensors_list_list">get_sensors_list(list)</h2>
 <pre>int (*get_sensors_list)(struct sensors_module_t* module, struct sensor_t
   const** list);</pre>
@@ -240,13 +240,13 @@
   <code>HAL_MODULE_INFO_SYM</code> of this type to expose the <a
   href="#get_sensors_list_list">get_sensors_list</a> function. See the definition
   of <code>sensors_module_t</code> in <a
-  href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> and the
+  href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> and the
   definition of <code>hw_module_t</code> for more information.</p>
 <h2 id="sensors_poll_device_t_sensors_poll_device_1_t">sensors_poll_device_t / sensors_poll_device_1_t</h2>
 <p><code>sensors_poll_device_1_t</code> contains the rest of the methods defined above:
   <code>activate</code>, <code>batch</code>, <code>flush</code> and
   <code>poll</code>. Its <code>common</code> field (of type <a
-  href="{@docRoot}devices/reference/structhw__device__t.html">hw_device_t</a>)
+  href="{@docRoot}devices/halref/structhw__device__t.html">hw_device_t</a>)
   defines the version number of the HAL.</p>
 <h2 id="sensor_t">sensor_t</h2>
 <p><code>sensor_t</code> represents an <a href="index.html">Android sensor</a>. Here are some of its important fields:</p>
@@ -268,7 +268,7 @@
   <em>Cool-product</em> team at Fictional-Company could use
   <code>stringType=”com.fictional_company.cool_product.unicorn_detector”</code>.
   The <code>stringType</code> is used to uniquely identify non-official sensors types. See <a
-  href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> for more
+  href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> for more
   information on types and string types.</p>
 <p><strong>requiredPermission:</strong> A string representing the permission that applications must
   possess to see the sensor, register to it and receive its data. An empty string
@@ -328,7 +328,7 @@
 <p>Sensor events generated by Android sensors and reported through the <a
 href="#poll">poll</a> function are of <code>type sensors_event_t</code>. Here are some
 important fields of <code>sensors_event_t</code>:</p>
-<p>version: must be <code>sizeof(struct sensors_event_t)</code></p>
+<p><strong>version:</strong> Must be <code>sizeof(struct sensors_event_t)</code></p>
 <p><strong>sensor:</strong> The handle of the sensor that generated the event, as defined by
   <code>sensor_t.handle</code>.</p>
 <p><strong>type:</strong> The sensor type of the sensor that generated the event, as defined by
@@ -342,9 +342,9 @@
   causes too high jitter, and using only the sensor chip time to set the
   timestamps can cause de-synchronization from the
   <code>elapsedRealtimeNano</code> clock, as the sensor clock drifts.</p>
-<p>data and overlapping fields: The values measured by the sensor. The meaning and
+<p><strong>data and overlapping fields:</strong> The values measured by the sensor. The meaning and
   units of those fields are specific to each sensor type. See <a
-  href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> and the
+  href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> and the
   definition of the different <a href="sensor-types.html">Sensor types</a> for a
   description of the data fields. For some sensors, the accuracy of the
   readings is also reported as part of the data, through a <code>status</code> field. This
@@ -355,10 +355,10 @@
 <p>Metadata events have the same type as normal sensor events:
   <code>sensors_event_meta_data_t = sensors_event_t</code>. They are returned together with
   other sensor events through poll. They possess the following fields:</p>
-<p>version must be <code>META_DATA_VERSION</code></p>
-<p>type must be <code>SENSOR_TYPE_META_DATA</code></p>
-<p>sensor, reserved, and <strong>timestamp </strong>must be 0</p>
-<p>meta_data.what contains the metadata type for this event. There is currently a
+<p><strong>version:</strong> Must be <code>META_DATA_VERSION</code></p>
+<p><strong>type:</strong> Must be <code>SENSOR_TYPE_META_DATA</code></p>
+<p><strong>sensor, reserved, and timestamp</strong>: Must be 0</p>
+<p><strong>meta_data.what:</strong> Contains the metadata type for this event. There is currently a
   single valid metadata type: <code>META_DATA_FLUSH_COMPLETE</code>.</p>
 <p><code>META_DATA_FLUSH_COMPLETE</code> events represent the completion of the flush of a
   sensor FIFO. When <code>meta_data.what=META_DATA_FLUSH_COMPLETE</code>, <code>meta_data.sensor</code>
diff --git a/src/devices/sensors/index.jd b/src/devices/sensors/index.jd
index 6f21488..dea285b 100644
--- a/src/devices/sensors/index.jd
+++ b/src/devices/sensors/index.jd
@@ -28,19 +28,19 @@
     <p>Android sensors give applications access to a mobile device's underlying
       physical sensors. They are data-providing virtual devices defined by the
       implementation of <a
-      href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a>,
+      href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a>,
       the sensor Hardware Abstraction Layer (HAL).</p>
     <ul>
       <li> Those virtual devices provide data coming from a set of physical sensors:
         accelerometers, gyroscopes, magnetometers, barometer, humidity, pressure,
-        light, proximity and heart rate sensors… </li>
+        light, proximity and heart rate sensors.</li>
       <li> Notably, camera, fingerprint sensor, microphone and touch screen are currently
         not in the list of physical devices providing data through “Android sensors.”
-        They have their own reporting mechanism. </li>
+        They have their own reporting mechanism.</li>
       <li> The separation is arbitrary, but in general, Android sensors provide lower
         bandwidth data. For example, “100hz x 3 channels” for an accelerometer versus
         “25hz x 8 MP x 3 channels” for a camera or “44kHz x 1 channel” for a
-        microphone. </li>
+        microphone.</li>
     </ul>
     <p>How the different physical sensors are connected to the system on chip
        (SoC) is not defined by Android.</p>
@@ -62,7 +62,7 @@
     <p>Each Android sensor has a “type” representing how the sensor behaves and what
       data it provides.</p>
     <ul>
-      <li> The official Android <a href="sensor-types.html">Sensor types</a> are defined in <a href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> under the names SENSOR_TYPE_…
+      <li> The official Android <a href="sensor-types.html">Sensor types</a> are defined in <a href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> under the names SENSOR_TYPE_…
         <ul>
           <li> The vast majority of sensors have an official sensor type. </li>
           <li> Those types are documented in the Android SDK. </li>
@@ -144,7 +144,7 @@
       </li>
       <li> Hardware abstraction layer (HAL)
         <ul>
-          <li> <a href="{@docRoot}devices/reference/sensors_8h_source.html">https://source.android.com/devices/reference/sensors_8h_source.html</a></li>
+          <li> <a href="{@docRoot}devices/halref/sensors_8h_source.html">https://source.android.com/devices/halref/sensors_8h_source.html</a></li>
           <li> Also known as “sensors.h” </li>
           <li> The source of truth. First document to be updated when new features are
             developed. </li>
diff --git a/src/devices/sensors/sensor-stack.jd b/src/devices/sensors/sensor-stack.jd
index 9776c44..5ffcce8 100644
--- a/src/devices/sensors/sensor-stack.jd
+++ b/src/devices/sensors/sensor-stack.jd
@@ -128,7 +128,7 @@
 <p>The interface is defined by Android and AOSP contributors, and the
   implementation is provided by the manufacturer of the device.</p>
 <p>The sensor HAL interface is located in <code>hardware/libhardware/include/hardware</code>.
-  See <a href="{@docRoot}devices/reference/sensors_8h.html">sensors.h</a> for additional details.</p>
+  See <a href="{@docRoot}devices/halref/sensors_8h.html">sensors.h</a> for additional details.</p>
 <h3 id="release_cycle">Release cycle</h3>
 <p>The HAL implementation specifies what version of the HAL interface it
   implements by setting <code>your_poll_device.common.version</code>. The existing HAL
diff --git a/src/devices/sensors/sensor-types.jd b/src/devices/sensors/sensor-types.jd
index 824680f..7ebac25 100644
--- a/src/devices/sensors/sensor-types.jd
+++ b/src/devices/sensors/sensor-types.jd
@@ -274,15 +274,17 @@
     <td><p>Continuous</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p>i<a href="#geomagnetic_rotation_vector"Geomagnetic rotation vector</a></p></td>
+    <td><p><a href="#geomagnetic_rotation_vector">Geomagnetic rotation
+     vector</a> <img src="images/battery_icon.png" width="20" height="20" alt="Low
+     power sensor" /></p></td>
     <td><p>Attitude</p></td>
     <td><p>Accelerometer, Magnetometer, MUST NOT USE Gyroscope</p></td>
     <td><p>Continuous</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#glance_gesture">Glance gesture</a></p></td>
+    <td><a href="#glance_gesture">Glance gesture</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Interaction</p></td>
     <td><p>Undefined</p></td>
     <td><p>One-shot</p></td>
@@ -318,8 +320,9 @@
     <td><p>Continuous</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#pick_up_gesture">Pick up gesture</a></p></td>
+    <td><p><a href="#pick_up_gesture">Pick up gesture</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Interaction</p></td>
     <td><p>Undefined</p></td>
     <td><p>One-shot</p></td>
@@ -331,43 +334,46 @@
     <td><p>Continuous</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#significant_motion">Significant motion</a></p></td>
+    <td><p><a href="#significant_motion">Significant motion</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Activity</p></td>
     <td><p>Accelerometer (or another as long as very low power)</p></td>
     <td><p>One-shot</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#step_counter">Step counter</a></p></td>
+    <td><p><a href="#step_counter">Step counter</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Activity</p></td>
     <td><p>Accelerometer</p></td>
     <td><p>On-change</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#step_detector">Step detector</a></p></td>
+    <td><p><a href="#step_detector">Step detector</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td> <td><p>Activity</p></td>
+    <td><p>Accelerometer</p></td>
+    <td><p>Special</p></td>
+  </tr>
+  <tr>
+    <td><p><a href="#tilt_detector">Tilt detector</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Activity</p></td>
     <td><p>Accelerometer</p></td>
     <td><p>Special</p></td>
   </tr>
   <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#tilt_detector">Tilt detector</a></p></td>
-    <td><p>Activity</p></td>
-    <td><p>Accelerometer</p></td>
-    <td><p>Special</p></td>
-  </tr>
-  <tr>
-    <td><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-      <p><a href="#wake_up_gesture">Wake up gesture</a></p></td>
+    <td><p><a href="#wake_up_gesture">Wake up gesture</a> <img
+     src="images/battery_icon.png" width="20" height="20" alt="Low power sensor"
+     /></p></td>
     <td><p>Interaction</p></td>
     <td><p>Undefined</p></td>
     <td><p>One-shot</p></td>
   </tr>
 </table>
-<img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" />
-<p> = Low power sensor</p>
+<p><img src="images/battery_icon.png" width="20" height="20" alt="Low power sensor" /> = Low power sensor</p>
 <h2 id="activity_composite_sensors">Activity composite sensors</h2>
 <h3 id="linear_acceleration">Linear acceleration</h3>
 <p>Underlying physical sensors:  Accelerometer and (if present) Gyroscope (or
@@ -622,7 +628,7 @@
   direction. (Mathematically speaking, it should be positive in the
   counter-clockwise direction):</p>
 <div class="figure" style="width:264px">
-  <imgsrc="images/axis_positive_roll.png" alt="Depiction of orientation
+  <img src="images/axis_positive_roll.png" alt="Depiction of orientation
    relative to a device" height="253" />
   <p class="img-caption">
     <strong>Figure 2.</strong> Orientation relative to a device.
diff --git a/src/devices/tech/encryption/index.jd b/src/devices/tech/encryption/index.jd
index 1a88d77..9d63354 100644
--- a/src/devices/tech/encryption/index.jd
+++ b/src/devices/tech/encryption/index.jd
@@ -127,7 +127,7 @@
 
 <p>In addition to these flows, the device can also fail to encrypt <code>/data</code>. Each of the flows are explained in detail below.</p>
 
-<h3 id=encrypt_a_new_device_with_forceencrypt>Encrypt a new device with <code>/forceencrypt</code></h3>
+<h3 id=encrypt_a_new_device_with_forceencrypt>Encrypt a new device with /forceencrypt</h3>
 
 <p>This is the normal first boot for an Android 5.0 device. </p>
 
diff --git a/src/devices/tech/index.jd b/src/devices/tech/index.jd
index c6b680a..4f69f26 100644
--- a/src/devices/tech/index.jd
+++ b/src/devices/tech/index.jd
@@ -60,7 +60,7 @@
 <p>Android's Hardware Abstraction Layer (HAL) provides the interface between
 software APIs and hardware drivers. This section contains the commented code
 files of the HAL.</p>
-<p><a href="{@docRoot}devices/reference/files.html">&raquo; HAL Reference</a></p>
+<p><a href="{@docRoot}devices/halref/files.html">&raquo; HAL Reference</a></p>
 
 <h2 id="kernel-technical-information">Kernel Technical Information</h2>
 <p>The kernel configuration settings in this document are meant to be used as a base
diff --git a/src/devices/tech/security/se-linux.jd b/src/devices/tech/security/se-linux.jd
index 6c34a02..bbc6ed8 100644
--- a/src/devices/tech/security/se-linux.jd
+++ b/src/devices/tech/security/se-linux.jd
@@ -63,7 +63,7 @@
 Per-domain permissive mode also enables policy development for new services
 while keeping the rest of the system enforcing.</p>
 
-<p>In the L release, Android moves to full enforcement of SELinux. This builds
+<p>In the Android 5.0 (L) release, Android moves to full enforcement of SELinux. This builds
 upon the permissive release of 4.3 and the partial enforcement of 4.4. In
 short, Android is shifting from enforcement on a limited set of crucial domains
 (<code>installd</code>, <code>netd</code>, <code>vold</code> and <code>zygote</code>) to everything (more than 60 domains). This means manufacturers will have to
@@ -71,7 +71,7 @@
 devices. Understand that:</p>
 
 <ul>
-  <li> Everything is in enforcing mode in the L release
+  <li> Everything is in enforcing mode in the 5.0 release
   <li> No processes other than <code>init</code> should run in the <code>init</code> domain
   <li> Any generic denial (for a block_device, socket_device, default_service, etc.)
 indicates that device needs a special domain
@@ -81,7 +81,7 @@
 
 <p>See the documentation below for details on constructing useful policies:</p>
 
-<p><a href="https://seandroid.bitbucket.org/PapersandPresentations.html">https://seandroid.bitbucket.org/PapersandPresentations.html</a></p>
+<p><a href="http://seandroid.bitbucket.org/PapersandPresentations.html">http://seandroid.bitbucket.org/PapersandPresentations.html</a></p>
 
 <p><a href="https://www.codeproject.com/Articles/806904/Android-Security-Customization-with-SEAndroid">https://www.codeproject.com/Articles/806904/Android-Security-Customization-with-SEAndroid</a></p>
 
@@ -93,7 +93,7 @@
 
 <p><a href="https://www.gnu.org/software/m4/manual/index.html">https://www.gnu.org/software/m4/manual/index.html</a></p>
 
-<p><a href="https://freecomputerbooks.com/books/The_SELinux_Notebook-4th_Edition.pdf">https://freecomputerbooks.com/books/The_SELinux_Notebook-4th_Edition.pdf</a></p>
+<p><a href="http://freecomputerbooks.com/books/The_SELinux_Notebook-4th_Edition.pdf">http://freecomputerbooks.com/books/The_SELinux_Notebook-4th_Edition.pdf</a></p>
 
 <h2 id=help>Help</h2>
 
diff --git a/src/devices/tv/HDMI-CEC.jd b/src/devices/tv/HDMI-CEC.jd
index 9c23ba5..bbf6547 100644
--- a/src/devices/tv/HDMI-CEC.jd
+++ b/src/devices/tv/HDMI-CEC.jd
@@ -95,8 +95,7 @@
 to use to implement the HAL layer.</li>
 </ul>
 
-<p class="note">
-<p><strong>Note</strong>: Device manufacturers should add the following line into <code>PRODUCT_COPY_FILES</code> in <code>device.mk</code></p>
+<p class="note"><strong>Note</strong>: Device manufacturers should add the following line into <code>PRODUCT_COPY_FILES</code> in <code>device.mk</code>.</p>
 
 <pre>
 PRODUCT_COPY_FILES += \
diff --git a/src/devices/tv/images/TV_App_CEC_integration.png b/src/devices/tv/images/TV_App_CEC_integration.png
index da2908c..bf36fac 100644
--- a/src/devices/tv/images/TV_App_CEC_integration.png
+++ b/src/devices/tv/images/TV_App_CEC_integration.png
Binary files differ
diff --git a/src/devices/tv/index.jd b/src/devices/tv/index.jd
index 72e03fa..cf24aa4 100644
--- a/src/devices/tv/index.jd
+++ b/src/devices/tv/index.jd
@@ -78,7 +78,9 @@
 <h2 id=permissions>Permissions</h2>
 
 <ul>
-  <li>Only <code><a href="http://developer.android.com/guide/topics/manifest/permission-element.html#plevel">signatureOrSystem</a> T</code>V Inputs and TV App have full access to the TV Provider database and are able
+  <li>Only <code><a
+href="http://developer.android.com/guide/topics/manifest/permission-element.html#plevel">signatureOrSystem</a></code>
+TV Inputs and TV App have full access to the TV Provider database and are able
 to receive KeyEvents.
   <li>Only system TV Inputs can access the TV Input HAL through the TV Input Manager
 service. TV Inputs are accessed one-to-one via TV Input Manager sessions.