Merge \"Camera: document expected timestamp source\" into nyc-dev
am: 8a22c41bf5

Change-Id: Iebce5b3330a010356892b68ed22b82e100fe9012
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index bacc566..004ecae 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -19219,7 +19219,7 @@
                 
           <tr class="entry" id="static_android.sensor.info.timestampSource">
             <td class="entry_name
-             " rowspan="3">
+             " rowspan="5">
               android.<wbr/>sensor.<wbr/>info.<wbr/>timestamp<wbr/>Source
             </td>
             <td class="entry_type">
@@ -19281,6 +19281,21 @@
             </td>
           </tr>
 
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">HAL Implementation Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>For camera devices implement UNKNOWN,<wbr/> the camera framework expects that the timestamp
+source to be SYSTEM_<wbr/>TIME_<wbr/>MONOTONIC.<wbr/> For camera devices implement REALTIME,<wbr/> the camera
+framework expects that the timestamp source to be SYSTEM_<wbr/>TIME_<wbr/>BOOTTIME.<wbr/> See
+system/<wbr/>core/<wbr/>include/<wbr/>utils/<wbr/>Timers.<wbr/>h for the definition of SYSTEM_<wbr/>TIME_<wbr/>MONOTONIC and
+SYSTEM_<wbr/>TIME_<wbr/>BOOTTIME.<wbr/> Note that HAL must follow above expectation; otherwise video
+recording might suffer unexpected behavior.<wbr/></p>
+<p>Also,<wbr/> camera devices implements REALTIME must pass the ITS sensor fusion test which
+tests the alignment between camera timestamps and gyro sensor timestamps.<wbr/></p>
+            </td>
+          </tr>
 
           <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
            <!-- end of entry -->
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index e7f4a5b..a1a5fac 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -6229,6 +6229,17 @@
             This characteristic defines the source for the timestamps, and therefore whether they
             can be compared against other system time sources/timestamps.
             </details>
+            <hal_details>
+            For camera devices implement UNKNOWN, the camera framework expects that the timestamp
+            source to be SYSTEM_TIME_MONOTONIC. For camera devices implement REALTIME, the camera
+            framework expects that the timestamp source to be SYSTEM_TIME_BOOTTIME. See
+            system/core/include/utils/Timers.h for the definition of SYSTEM_TIME_MONOTONIC and
+            SYSTEM_TIME_BOOTTIME. Note that HAL must follow above expectation; otherwise video
+            recording might suffer unexpected behavior.
+
+            Also, camera devices implements REALTIME must pass the ITS sensor fusion test which
+            tests the alignment between camera timestamps and gyro sensor timestamps.
+            </hal_details>
           <tag id="V1" />
         </entry>
         <entry name="lensShadingApplied" type="byte" visibility="public" enum="true"