Camera: Enforce ZERO_SHUTTER_LAG mode

Camera devices that support YUV or PRIVATE reprocessing must list
ZERO_SHUTTER_LAG mode in android.edge.availableEdgeModes and
android.noiseReduction.availableNoiseReductionModes, and it must
be the default mode for ZSL template.

Bug: 22266686
Change-Id: If62226b495557bcf4b72f579d7fb993d4b30c089
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index 932c27c..2116bbd 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -8750,7 +8750,8 @@
 reasonable preview quality.<wbr/></p>
 <p>This mode is guaranteed to be supported by devices that support either the
 YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING capabilities
-(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities).<wbr/></p></span>
+(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities) and it will
+be the default mode for CAMERA3_<wbr/>TEMPLATE_<wbr/>ZERO_<wbr/>SHUTTER_<wbr/>LAG template.<wbr/></p></span>
                   </li>
                 </ul>
 
@@ -8934,7 +8935,9 @@
           </tr>
           <tr class="entry_cont">
             <td class="entry_details" colspan="5">
-              <p>Full-capability camera devices must always support OFF; all devices will list FAST.<wbr/></p>
+              <p>Full-capability camera devices must always support OFF; camera devices that support
+YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING will list ZERO_<wbr/>SHUTTER_<wbr/>LAG; all devices will
+list FAST.<wbr/></p>
             </td>
           </tr>
 
@@ -9029,7 +9032,8 @@
 reasonable preview quality.<wbr/></p>
 <p>This mode is guaranteed to be supported by devices that support either the
 YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING capabilities
-(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities).<wbr/></p></span>
+(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities) and it will
+be the default mode for CAMERA3_<wbr/>TEMPLATE_<wbr/>ZERO_<wbr/>SHUTTER_<wbr/>LAG template.<wbr/></p></span>
                   </li>
                 </ul>
 
@@ -13484,7 +13488,8 @@
 applied for reasonable preview quality.<wbr/></p>
 <p>This mode is guaranteed to be supported by devices that support either the
 YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING capabilities
-(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities).<wbr/></p></span>
+(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities) and it will
+be the default mode for CAMERA3_<wbr/>TEMPLATE_<wbr/>ZERO_<wbr/>SHUTTER_<wbr/>LAG template.<wbr/></p></span>
                   </li>
                 </ul>
 
@@ -13675,6 +13680,8 @@
           <tr class="entry_cont">
             <td class="entry_details" colspan="5">
               <p>Full-capability camera devices will always support OFF and FAST.<wbr/></p>
+<p>Camera devices that support YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING will support
+ZERO_<wbr/>SHUTTER_<wbr/>LAG.<wbr/></p>
 <p>Legacy-capability camera devices will only support FAST mode.<wbr/></p>
             </td>
           </tr>
@@ -13778,7 +13785,8 @@
 applied for reasonable preview quality.<wbr/></p>
 <p>This mode is guaranteed to be supported by devices that support either the
 YUV_<wbr/>REPROCESSING or PRIVATE_<wbr/>REPROCESSING capabilities
-(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities).<wbr/></p></span>
+(<a href="#static_android.request.availableCapabilities">android.<wbr/>request.<wbr/>available<wbr/>Capabilities</a> lists either of those capabilities) and it will
+be the default mode for CAMERA3_<wbr/>TEMPLATE_<wbr/>ZERO_<wbr/>SHUTTER_<wbr/>LAG template.<wbr/></p></span>
                   </li>
                 </ul>
 
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index ed6bed0..874ce0c 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -2739,7 +2739,8 @@
 
             This mode is guaranteed to be supported by devices that support either the
             YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
-            (android.request.availableCapabilities lists either of those capabilities).
+            (android.request.availableCapabilities lists either of those capabilities) and it will
+            be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
             </notes></value>
           </enum>
           <description>Operation mode for edge
@@ -2795,7 +2796,9 @@
           </description>
           <range>Any value listed in android.edge.mode</range>
           <details>
-          Full-capability camera devices must always support OFF; all devices will list FAST.
+          Full-capability camera devices must always support OFF; camera devices that support
+          YUV_REPROCESSING or PRIVATE_REPROCESSING will list ZERO_SHUTTER_LAG; all devices will
+          list FAST.
           </details>
           <hal_details>
           HAL must support both FAST and HIGH_QUALITY if edge enhancement control is available
@@ -3912,7 +3915,8 @@
 
             This mode is guaranteed to be supported by devices that support either the
             YUV_REPROCESSING or PRIVATE_REPROCESSING capabilities
-            (android.request.availableCapabilities lists either of those capabilities).
+            (android.request.availableCapabilities lists either of those capabilities) and it will
+            be the default mode for CAMERA3_TEMPLATE_ZERO_SHUTTER_LAG template.
             </notes></value>
           </enum>
           <description>Mode of operation for the noise reduction algorithm.</description>
@@ -3977,6 +3981,9 @@
           <details>
           Full-capability camera devices will always support OFF and FAST.
 
+          Camera devices that support YUV_REPROCESSING or PRIVATE_REPROCESSING will support
+          ZERO_SHUTTER_LAG.
+
           Legacy-capability camera devices will only support FAST mode.
           </details>
           <hal_details>