Merge "Camera: clarify lens shading map" into nyc-dev
diff --git a/camera/docs/CameraDeviceInfo.mako b/camera/docs/CameraDeviceInfo.mako
index de35edf..1f89865 100644
--- a/camera/docs/CameraDeviceInfo.mako
+++ b/camera/docs/CameraDeviceInfo.mako
@@ -24,7 +24,7 @@
         HashSet<String> charsKeyNames = new HashSet<String>();
 % for sec in find_all_sections(metadata):
   % for entry in find_unique_entries(sec):
-    % if entry.kind == 'static' and entry.visibility == "public":
+    % if entry.kind == 'static' and entry.visibility in ("public", "java_public"):
         charsKeyNames.add(CameraCharacteristics.${jkey_identifier(entry.name)}.getName());
     % endif
   % endfor
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index cac793c..fcb399d 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -4181,7 +4181,7 @@
             </td> <!-- entry_type -->
 
             <td class="entry_description">
-              <p>The amount of additional sesnsitivity boost applied to output images
+              <p>The amount of additional sensitivity boost applied to output images
 after RAW sensor data is captured.<wbr/></p>
             </td>
 
@@ -4206,10 +4206,10 @@
 camera processing pipeline after sensor RAW image is captured.<wbr/>
 Such a boost will be applied to YUV/<wbr/>JPEG format output images but will not
 have effect on RAW output formats like RAW_<wbr/>SENSOR,<wbr/> RAW10,<wbr/> RAW12 or RAW_<wbr/>OPAQUE.<wbr/></p>
-<p>This key is optional.<wbr/> Applications can assume there is no boost applied
-after RAW is captured if this key is not available.<wbr/>
-When this key is available,<wbr/> the sensitivity boost value must be within
-<a href="#static_android.control.postRawSensitivityBoostRange">android.<wbr/>control.<wbr/>post<wbr/>Raw<wbr/>Sensitivity<wbr/>Boost<wbr/>Range</a>.<wbr/></p>
+<p>This key will be <code>null</code> for devices that do not support any RAW format
+outputs.<wbr/> For devices that do support RAW format outputs,<wbr/> this key will always
+present,<wbr/> and if a device does not support post RAW sensitivity boost,<wbr/> it will
+list <code>100</code> in this key.<wbr/></p>
 <p>If the camera device cannot apply the exact boost requested,<wbr/> it will reduce the
 boost to the nearest supported value.<wbr/>
 The final boost value used will be available in the output capture result.<wbr/></p>
@@ -8827,7 +8827,7 @@
             </td> <!-- entry_type -->
 
             <td class="entry_description">
-              <p>The amount of additional sesnsitivity boost applied to output images
+              <p>The amount of additional sensitivity boost applied to output images
 after RAW sensor data is captured.<wbr/></p>
             </td>
 
@@ -8852,10 +8852,10 @@
 camera processing pipeline after sensor RAW image is captured.<wbr/>
 Such a boost will be applied to YUV/<wbr/>JPEG format output images but will not
 have effect on RAW output formats like RAW_<wbr/>SENSOR,<wbr/> RAW10,<wbr/> RAW12 or RAW_<wbr/>OPAQUE.<wbr/></p>
-<p>This key is optional.<wbr/> Applications can assume there is no boost applied
-after RAW is captured if this key is not available.<wbr/>
-When this key is available,<wbr/> the sensitivity boost value must be within
-<a href="#static_android.control.postRawSensitivityBoostRange">android.<wbr/>control.<wbr/>post<wbr/>Raw<wbr/>Sensitivity<wbr/>Boost<wbr/>Range</a>.<wbr/></p>
+<p>This key will be <code>null</code> for devices that do not support any RAW format
+outputs.<wbr/> For devices that do support RAW format outputs,<wbr/> this key will always
+present,<wbr/> and if a device does not support post RAW sensitivity boost,<wbr/> it will
+list <code>100</code> in this key.<wbr/></p>
 <p>If the camera device cannot apply the exact boost requested,<wbr/> it will reduce the
 boost to the nearest supported value.<wbr/>
 The final boost value used will be available in the output capture result.<wbr/></p>
diff --git a/camera/docs/metadata_model.py b/camera/docs/metadata_model.py
index 84edeb7..e059e33 100644
--- a/camera/docs/metadata_model.py
+++ b/camera/docs/metadata_model.py
@@ -351,6 +351,21 @@
       self._entry_map[p.kind].pop(p.name)
       self._entries_ordered.remove(p)
 
+  def is_entry_this_kind(self, entry, kind):
+    """
+    Check if input entry if of input kind
+
+    Args:
+      entry: an Entry object
+      kind: a string. Possible values are "static", "dynamic", "controls"
+
+    Returns:
+      A boolean indicating whether input entry is of input kind.
+    """
+    if kind not in ("static", "dynamic", "controls"):
+      assert(False), "Unknown kind value " + kind
+
+    return entry.name in self._entry_map[kind]
 
   # After all entries/clones are inserted,
   # invoke this to generate the parent/child node graph all these objects
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index a878534..b216851 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -2758,7 +2758,7 @@
       </static>
       <controls>
         <entry name="postRawSensitivityBoost" type="int32" visibility="public">
-          <description>The amount of additional sesnsitivity boost applied to output images
+          <description>The amount of additional sensitivity boost applied to output images
              after RAW sensor data is captured.
           </description>
           <units>ISO arithmetic units, the same as android.sensor.sensitivity</units>
@@ -2769,10 +2769,10 @@
           Such a boost will be applied to YUV/JPEG format output images but will not
           have effect on RAW output formats like RAW_SENSOR, RAW10, RAW12 or RAW_OPAQUE.
 
-          This key is optional. Applications can assume there is no boost applied
-          after RAW is captured if this key is not available.
-          When this key is available, the sensitivity boost value must be within
-          android.control.postRawSensitivityBoostRange.
+          This key will be `null` for devices that do not support any RAW format
+          outputs. For devices that do support RAW format outputs, this key will always
+          present, and if a device does not support post RAW sensitivity boost, it will
+          list `100` in this key.
 
           If the camera device cannot apply the exact boost requested, it will reduce the
           boost to the nearest supported value.
diff --git a/camera/docs/ndk_camera_metadata_tags.mako b/camera/docs/ndk_camera_metadata_tags.mako
index f60f0cb..83f9cb5 100644
--- a/camera/docs/ndk_camera_metadata_tags.mako
+++ b/camera/docs/ndk_camera_metadata_tags.mako
@@ -74,6 +74,26 @@
           % if entry.deprecated:
     ${ndk(entry.name) + " = " | csym,ljust(60)}// Deprecated! DO NOT USE
           % else:
+            % if entry.description or entry.details:
+    /**
+${entry.description | ndkdoc(metadata)}\
+     *
+     * <p>This tag may appear in:</p>
+     * <ul>
+              % if metadata.is_entry_this_kind(entry, 'static'):
+     *   <li>ACameraMetadata from ACameraManager_getCameraCharacteristics</li>
+              % endif
+              % if metadata.is_entry_this_kind(entry, 'dynamic'):
+     *   <li>ACameraMetadata from ACameraCaptureSession_captureCallback_result callbacks</li>
+              % endif
+              % if metadata.is_entry_this_kind(entry, 'controls'):
+     *   <li>ACaptureRequest</li>
+              % endif
+     * </ul>
+     *
+${entry.details | ndkdoc(metadata)}\
+     */
+            % endif
     ${ndk(entry.name) + " = " | csym,ljust(60)}// ${annotated_type(entry)}
           % endif
           % if idx == 0:
@@ -122,7 +142,7 @@
           % endif
         % endif
         % if (val.notes or val.deprecated):
-    /*
+    /**
           % if val.notes:
 ${val.notes | ndkdoc(metadata)}\
           % endif