Merge "camera_metadata: Add android.scaler.availableInputOutputFormatsMap"
diff --git a/camera/docs/docs.html b/camera/docs/docs.html
index 2e0afee..105075e 100644
--- a/camera/docs/docs.html
+++ b/camera/docs/docs.html
@@ -500,18 +500,10 @@
 
             <li><a href="#static_android.sensor.baseGainFactor">android.sensor.baseGainFactor</a></li>
             <li><a href="#static_android.sensor.blackLevelPattern">android.sensor.blackLevelPattern</a></li>
-            <li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a></li>
-            <li><a href="#static_android.sensor.calibrationTransform2">android.sensor.calibrationTransform2</a></li>
-            <li><a href="#static_android.sensor.colorTransform1">android.sensor.colorTransform1</a></li>
-            <li><a href="#static_android.sensor.colorTransform2">android.sensor.colorTransform2</a></li>
-            <li><a href="#static_android.sensor.forwardMatrix1">android.sensor.forwardMatrix1</a></li>
-            <li><a href="#static_android.sensor.forwardMatrix2">android.sensor.forwardMatrix2</a></li>
             <li><a href="#static_android.sensor.maxAnalogSensitivity">android.sensor.maxAnalogSensitivity</a></li>
             <li><a href="#static_android.sensor.noiseModelCoefficients">android.sensor.noiseModelCoefficients</a></li>
             <li><a href="#static_android.sensor.orientation">android.sensor.orientation</a></li>
             <li><a href="#static_android.sensor.profileHueSatMapDimensions">android.sensor.profileHueSatMapDimensions</a></li>
-            <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a></li>
-            <li><a href="#static_android.sensor.referenceIlluminant2">android.sensor.referenceIlluminant2</a></li>
             <li><a href="#static_android.sensor.availableTestPatternModes">android.sensor.availableTestPatternModes</a></li>
           </ul>
         </li>
@@ -523,6 +515,10 @@
             <li><a href="#dynamic_android.sensor.sensitivity">android.sensor.sensitivity</a></li>
             <li><a href="#dynamic_android.sensor.timestamp">android.sensor.timestamp</a></li>
             <li><a href="#dynamic_android.sensor.temperature">android.sensor.temperature</a></li>
+            <li><a href="#dynamic_android.sensor.referenceIlluminant">android.sensor.referenceIlluminant</a></li>
+            <li><a href="#dynamic_android.sensor.calibrationTransform">android.sensor.calibrationTransform</a></li>
+            <li><a href="#dynamic_android.sensor.colorTransform">android.sensor.colorTransform</a></li>
+            <li><a href="#dynamic_android.sensor.forwardMatrix">android.sensor.forwardMatrix</a></li>
             <li><a href="#dynamic_android.sensor.neutralColorPoint">android.sensor.neutralColorPoint</a></li>
             <li><a href="#dynamic_android.sensor.profileHueSatMap">android.sensor.profileHueSatMap</a></li>
             <li><a href="#dynamic_android.sensor.profileToneCurve">android.sensor.profileToneCurve</a></li>
@@ -11696,264 +11692,6 @@
            <!-- end of entry -->
         
                 
-          <tr class="entry" id="static_android.sensor.calibrationTransform1">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>calibration<wbr/>Transform1
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Per-device calibration on top of color space
-transform 1</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.calibrationTransform2">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>calibration<wbr/>Transform2
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Per-device calibration on top of color space
-transform 2</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.colorTransform1">
-            <td class="entry_name" rowspan="3">
-              android.<wbr/>sensor.<wbr/>color<wbr/>Transform1
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Linear mapping from XYZ (D50) color space to
-reference linear sensor color,<wbr/> for first reference
-illuminant</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="5">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="5">
-              <p>Use as follows XYZ = inv(transform) * clip( (raw -
-black level(raw) ) /<wbr/> ( white level - max black level) ).<wbr/>
-At least in the simple case</p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.colorTransform2">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>color<wbr/>Transform2
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Linear mapping from XYZ (D50) color space to
-reference linear sensor color,<wbr/> for second reference
-illuminant</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.forwardMatrix1">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>forward<wbr/>Matrix1
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Used by DNG for better WB
-adaptation</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.forwardMatrix2">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>forward<wbr/>Matrix2
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">rational</span>
-                <span class="entry_type_container">x</span>
-
-                <span class="entry_type_array">
-                  9
-                </span>
-              <span class="entry_type_visibility"> [system]</span>
-                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Used by DNG for better WB
-adaptation</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-              </ul>
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
           <tr class="entry" id="static_android.sensor.maxAnalogSensitivity">
             <td class="entry_name" rowspan="3">
               android.<wbr/>sensor.<wbr/>max<wbr/>Analog<wbr/>Sensitivity
@@ -12155,169 +11893,6 @@
            <!-- end of entry -->
         
                 
-          <tr class="entry" id="static_android.sensor.referenceIlluminant1">
-            <td class="entry_name" rowspan="3">
-              android.<wbr/>sensor.<wbr/>reference<wbr/>Illuminant1
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name entry_type_name_enum">byte</span>
-
-              <span class="entry_type_visibility"> [system]</span>
-
-                <ul class="entry_type_enum">
-                  <li>
-                    <span class="entry_type_enum_name">DAYLIGHT</span>
-                    <span class="entry_type_enum_value">1</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FLUORESCENT</span>
-                    <span class="entry_type_enum_value">2</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">TUNGSTEN</span>
-                    <span class="entry_type_enum_value">3</span>
-                    <span class="entry_type_enum_notes"><p>Incandescent light</p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FLASH</span>
-                    <span class="entry_type_enum_value">4</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">FINE_WEATHER</span>
-                    <span class="entry_type_enum_value">9</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">CLOUDY_WEATHER</span>
-                    <span class="entry_type_enum_value">10</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">SHADE</span>
-                    <span class="entry_type_enum_value">11</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">DAYLIGHT_FLUORESCENT</span>
-                    <span class="entry_type_enum_value">12</span>
-                    <span class="entry_type_enum_notes"><p>D 5700 - 7100K</p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">DAY_WHITE_FLUORESCENT</span>
-                    <span class="entry_type_enum_value">13</span>
-                    <span class="entry_type_enum_notes"><p>N 4600 - 5400K</p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">COOL_WHITE_FLUORESCENT</span>
-                    <span class="entry_type_enum_value">14</span>
-                    <span class="entry_type_enum_notes"><p>W 3900 - 4500K</p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">WHITE_FLUORESCENT</span>
-                    <span class="entry_type_enum_value">15</span>
-                    <span class="entry_type_enum_notes"><p>WW 3200 - 3700K</p></span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">STANDARD_A</span>
-                    <span class="entry_type_enum_value">17</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">STANDARD_B</span>
-                    <span class="entry_type_enum_value">18</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">STANDARD_C</span>
-                    <span class="entry_type_enum_value">19</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">D55</span>
-                    <span class="entry_type_enum_value">20</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">D65</span>
-                    <span class="entry_type_enum_value">21</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">D75</span>
-                    <span class="entry_type_enum_value">22</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">D50</span>
-                    <span class="entry_type_enum_value">23</span>
-                  </li>
-                  <li>
-                    <span class="entry_type_enum_name">ISO_STUDIO_TUNGSTEN</span>
-                    <span class="entry_type_enum_value">24</span>
-                  </li>
-                </ul>
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Light source used to define transform
-1</p>
-            </td>
-
-            <td class="entry_units">
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-              <ul class="entry_tags">
-                  <li><a href="#tag_DNG">DNG</a></li>
-                  <li><a href="#tag_EXIF">EXIF</a></li>
-              </ul>
-            </td>
-
-          </tr>
-          <tr class="entries_header">
-            <th class="th_details" colspan="5">Details</th>
-          </tr>
-          <tr class="entry_cont">
-            <td class="entry_details" colspan="5">
-              <p>[EXIF LightSource tag] Must all these be
-supported? Need CCT for each!</p>
-            </td>
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
-          <tr class="entry" id="static_android.sensor.referenceIlluminant2">
-            <td class="entry_name" rowspan="1">
-              android.<wbr/>sensor.<wbr/>reference<wbr/>Illuminant2
-            </td>
-            <td class="entry_type">
-                <span class="entry_type_name">byte</span>
-
-              <span class="entry_type_visibility"> [system]</span>
-
-
-            </td> <!-- entry_type -->
-
-            <td class="entry_description">
-              <p>Light source used to define transform
-2</p>
-            </td>
-
-            <td class="entry_units">
-              Same as illuminant 1
-            </td>
-
-            <td class="entry_range">
-            </td>
-
-            <td class="entry_tags">
-            </td>
-
-          </tr>
-
-
-          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
-           <!-- end of entry -->
-        
-                
           <tr class="entry" id="static_android.sensor.availableTestPatternModes">
             <td class="entry_name" rowspan="1">
               android.<wbr/>sensor.<wbr/>available<wbr/>Test<wbr/>Pattern<wbr/>Modes
@@ -12694,6 +12269,294 @@
            <!-- end of entry -->
         
                 
+          <tr class="entry" id="dynamic_android.sensor.referenceIlluminant">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>reference<wbr/>Illuminant
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name entry_type_name_enum">byte</span>
+
+              <span class="entry_type_visibility"> [system]</span>
+
+                <ul class="entry_type_enum">
+                  <li>
+                    <span class="entry_type_enum_name">DAYLIGHT</span>
+                    <span class="entry_type_enum_value">1</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">FLUORESCENT</span>
+                    <span class="entry_type_enum_value">2</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">TUNGSTEN</span>
+                    <span class="entry_type_enum_value">3</span>
+                    <span class="entry_type_enum_notes"><p>Incandescent light</p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">FLASH</span>
+                    <span class="entry_type_enum_value">4</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">FINE_WEATHER</span>
+                    <span class="entry_type_enum_value">9</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">CLOUDY_WEATHER</span>
+                    <span class="entry_type_enum_value">10</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">SHADE</span>
+                    <span class="entry_type_enum_value">11</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">DAYLIGHT_FLUORESCENT</span>
+                    <span class="entry_type_enum_value">12</span>
+                    <span class="entry_type_enum_notes"><p>D 5700 - 7100K</p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">DAY_WHITE_FLUORESCENT</span>
+                    <span class="entry_type_enum_value">13</span>
+                    <span class="entry_type_enum_notes"><p>N 4600 - 5400K</p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">COOL_WHITE_FLUORESCENT</span>
+                    <span class="entry_type_enum_value">14</span>
+                    <span class="entry_type_enum_notes"><p>W 3900 - 4500K</p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">WHITE_FLUORESCENT</span>
+                    <span class="entry_type_enum_value">15</span>
+                    <span class="entry_type_enum_notes"><p>WW 3200 - 3700K</p></span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">STANDARD_A</span>
+                    <span class="entry_type_enum_value">17</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">STANDARD_B</span>
+                    <span class="entry_type_enum_value">18</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">STANDARD_C</span>
+                    <span class="entry_type_enum_value">19</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">D55</span>
+                    <span class="entry_type_enum_value">20</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">D65</span>
+                    <span class="entry_type_enum_value">21</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">D75</span>
+                    <span class="entry_type_enum_value">22</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">D50</span>
+                    <span class="entry_type_enum_value">23</span>
+                  </li>
+                  <li>
+                    <span class="entry_type_enum_name">ISO_STUDIO_TUNGSTEN</span>
+                    <span class="entry_type_enum_value">24</span>
+                  </li>
+                </ul>
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A reference illumination source roughly matching the current scene
+illumination,<wbr/> which is used to describe the sensor color space
+transformations.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+                  <li><a href="#tag_EXIF">EXIF</a></li>
+              </ul>
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>The values in this tag correspond to the values defined for the
+EXIF LightSource tag.<wbr/> These illuminants are standard light sources
+that are often used for calibrating camera devices.<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
+          <tr class="entry" id="dynamic_android.sensor.calibrationTransform">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>calibration<wbr/>Transform
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">rational</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  3 x 3
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A per-device calibration transform matrix to be applied after the
+color space transform when rendering the raw image buffer.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>This matrix is expressed as a 3x3 matrix in row-major-order,<wbr/> and
+contains a per-device calibration transform that maps colors
+from reference camera color space (i.<wbr/>e.<wbr/> the "golden module"
+colorspace) into this camera device's linear native sensor color
+space for the current scene illumination and white balance choice.<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
+          <tr class="entry" id="dynamic_android.sensor.colorTransform">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>color<wbr/>Transform
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">rational</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  3 x 3
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A matrix that transforms color values from CIE XYZ color space to
+reference camera color space when rendering the raw image buffer.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>This matrix is expressed as a 3x3 matrix in row-major-order,<wbr/> and
+contains a color transform matrix that maps colors from the CIE
+XYZ color space to the reference camera raw color space (i.<wbr/>e.<wbr/> the
+"golden module" colorspace) for the current scene illumination and
+white balance choice.<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
+          <tr class="entry" id="dynamic_android.sensor.forwardMatrix">
+            <td class="entry_name" rowspan="3">
+              android.<wbr/>sensor.<wbr/>forward<wbr/>Matrix
+            </td>
+            <td class="entry_type">
+                <span class="entry_type_name">rational</span>
+                <span class="entry_type_container">x</span>
+
+                <span class="entry_type_array">
+                  3 x 3
+                </span>
+              <span class="entry_type_visibility"> [public]</span>
+                <div class="entry_type_notes">3x3 matrix in row-major-order</div>
+
+
+            </td> <!-- entry_type -->
+
+            <td class="entry_description">
+              <p>A matrix that transforms white balanced camera colors to the CIE XYZ
+colorspace with a D50 whitepoint.<wbr/></p>
+            </td>
+
+            <td class="entry_units">
+            </td>
+
+            <td class="entry_range">
+            </td>
+
+            <td class="entry_tags">
+              <ul class="entry_tags">
+                  <li><a href="#tag_DNG">DNG</a></li>
+              </ul>
+            </td>
+
+          </tr>
+          <tr class="entries_header">
+            <th class="th_details" colspan="5">Details</th>
+          </tr>
+          <tr class="entry_cont">
+            <td class="entry_details" colspan="5">
+              <p>This matrix is expressed as a 3x3 matrix in row-major-order,<wbr/> and contains
+a color transform matrix that maps a unit vector in the linear native
+sensor color space to the D50 whitepoint in CIE XYZ color space.<wbr/></p>
+            </td>
+          </tr>
+
+
+          <tr class="entry_spacer"><td class="entry_spacer" colspan="6"></td></tr>
+           <!-- end of entry -->
+        
+                
           <tr class="entry" id="dynamic_android.sensor.neutralColorPoint">
             <td class="entry_name" rowspan="3">
               android.<wbr/>sensor.<wbr/>neutral<wbr/>Color<wbr/>Point
@@ -16174,14 +16037,11 @@
           <li><a href="#static_android.sensor.info.pixelArraySize">android.sensor.info.pixelArraySize</a> (static)</li>
           <li><a href="#static_android.sensor.info.whiteLevel">android.sensor.info.whiteLevel</a> (static)</li>
           <li><a href="#static_android.sensor.blackLevelPattern">android.sensor.blackLevelPattern</a> (static)</li>
-          <li><a href="#static_android.sensor.calibrationTransform1">android.sensor.calibrationTransform1</a> (static)</li>
-          <li><a href="#static_android.sensor.calibrationTransform2">android.sensor.calibrationTransform2</a> (static)</li>
-          <li><a href="#static_android.sensor.colorTransform1">android.sensor.colorTransform1</a> (static)</li>
-          <li><a href="#static_android.sensor.colorTransform2">android.sensor.colorTransform2</a> (static)</li>
-          <li><a href="#static_android.sensor.forwardMatrix1">android.sensor.forwardMatrix1</a> (static)</li>
-          <li><a href="#static_android.sensor.forwardMatrix2">android.sensor.forwardMatrix2</a> (static)</li>
           <li><a href="#static_android.sensor.profileHueSatMapDimensions">android.sensor.profileHueSatMapDimensions</a> (static)</li>
-          <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
+          <li><a href="#dynamic_android.sensor.referenceIlluminant">android.sensor.referenceIlluminant</a> (dynamic)</li>
+          <li><a href="#dynamic_android.sensor.calibrationTransform">android.sensor.calibrationTransform</a> (dynamic)</li>
+          <li><a href="#dynamic_android.sensor.colorTransform">android.sensor.colorTransform</a> (dynamic)</li>
+          <li><a href="#dynamic_android.sensor.forwardMatrix">android.sensor.forwardMatrix</a> (dynamic)</li>
           <li><a href="#dynamic_android.sensor.neutralColorPoint">android.sensor.neutralColorPoint</a> (dynamic)</li>
           <li><a href="#dynamic_android.sensor.profileHueSatMap">android.sensor.profileHueSatMap</a> (dynamic)</li>
           <li><a href="#dynamic_android.sensor.profileToneCurve">android.sensor.profileToneCurve</a> (dynamic)</li>
@@ -16190,7 +16050,7 @@
       </li> <!-- tag_DNG -->
       <li id="tag_EXIF">EXIF - None
         <ul class="tags_entries">
-          <li><a href="#static_android.sensor.referenceIlluminant1">android.sensor.referenceIlluminant1</a> (static)</li>
+          <li><a href="#dynamic_android.sensor.referenceIlluminant">android.sensor.referenceIlluminant</a> (dynamic)</li>
         </ul>
       </li> <!-- tag_EXIF -->
       <li id="tag_HAL2">HAL2 - 
diff --git a/camera/docs/metadata_properties.xml b/camera/docs/metadata_properties.xml
index 102a342..03dfb3f 100644
--- a/camera/docs/metadata_properties.xml
+++ b/camera/docs/metadata_properties.xml
@@ -3363,71 +3363,6 @@
           </details>
           <tag id="DNG" />
         </entry>
-        <entry name="calibrationTransform1" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Per-device calibration on top of color space
-          transform 1</description>
-          <tag id="DNG" />
-        </entry>
-        <entry name="calibrationTransform2" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Per-device calibration on top of color space
-          transform 2</description>
-          <tag id="DNG" />
-        </entry>
-        <entry name="colorTransform1" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Linear mapping from XYZ (D50) color space to
-          reference linear sensor color, for first reference
-          illuminant</description>
-          <details>Use as follows XYZ = inv(transform) * clip( (raw -
-          black level(raw) ) / ( white level - max black level) ).
-          At least in the simple case</details>
-          <tag id="DNG" />
-        </entry>
-        <entry name="colorTransform2" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Linear mapping from XYZ (D50) color space to
-          reference linear sensor color, for second reference
-          illuminant</description>
-          <tag id="DNG" />
-        </entry>
-        <entry name="forwardMatrix1" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Used by DNG for better WB
-          adaptation</description>
-          <tag id="DNG" />
-        </entry>
-        <entry name="forwardMatrix2" type="rational"
-        type_notes="3x3 matrix in row-major-order"
-        container="array">
-          <array>
-            <size>9</size>
-          </array>
-          <description>Used by DNG for better WB
-          adaptation</description>
-          <tag id="DNG" />
-        </entry>
         <entry name="maxAnalogSensitivity" type="int32" visibility="public"
         optional="true">
           <description>Maximum sensitivity that is implemented
@@ -3492,45 +3427,6 @@
           </details>
           <tag id="DNG" />
         </entry>
-        <entry name="referenceIlluminant1" type="byte" enum="true">
-          <enum>
-            <value id="1">DAYLIGHT</value>
-            <value id="2">FLUORESCENT</value>
-            <value id="3">TUNGSTEN
-            <notes>Incandescent light</notes></value>
-            <value id="4">FLASH</value>
-            <value id="9">FINE_WEATHER</value>
-            <value id="10">CLOUDY_WEATHER</value>
-            <value id="11">SHADE</value>
-            <value id="12">DAYLIGHT_FLUORESCENT
-            <notes>D 5700 - 7100K</notes></value>
-            <value id="13">DAY_WHITE_FLUORESCENT
-            <notes>N 4600 - 5400K</notes></value>
-            <value id="14">COOL_WHITE_FLUORESCENT
-            <notes>W 3900 - 4500K</notes></value>
-            <value id="15">WHITE_FLUORESCENT
-            <notes>WW 3200 - 3700K</notes></value>
-            <value id="17">STANDARD_A</value>
-            <value id="18">STANDARD_B</value>
-            <value id="19">STANDARD_C</value>
-            <value id="20">D55</value>
-            <value id="21">D65</value>
-            <value id="22">D75</value>
-            <value id="23">D50</value>
-            <value id="24">ISO_STUDIO_TUNGSTEN</value>
-          </enum>
-          <description>Light source used to define transform
-          1</description>
-          <details>[EXIF LightSource tag] Must all these be
-          supported? Need CCT for each!</details>
-          <tag id="DNG" />
-          <tag id="EXIF" />
-        </entry>
-        <entry name="referenceIlluminant2" type="byte">
-          <description>Light source used to define transform
-          2</description>
-          <units>Same as illuminant 1</units>
-        </entry>
       </static>
       <dynamic>
         <clone entry="android.sensor.exposureTime" kind="controls">
@@ -3561,6 +3457,104 @@
           <range>Optional. This value is missing if no temperature is available.</range>
           <tag id="FULL" />
         </entry>
+        <entry name="referenceIlluminant" type="byte" enum="true">
+          <enum>
+            <value id="1">DAYLIGHT</value>
+            <value id="2">FLUORESCENT</value>
+            <value id="3">TUNGSTEN
+            <notes>Incandescent light</notes></value>
+            <value id="4">FLASH</value>
+            <value id="9">FINE_WEATHER</value>
+            <value id="10">CLOUDY_WEATHER</value>
+            <value id="11">SHADE</value>
+            <value id="12">DAYLIGHT_FLUORESCENT
+            <notes>D 5700 - 7100K</notes></value>
+            <value id="13">DAY_WHITE_FLUORESCENT
+            <notes>N 4600 - 5400K</notes></value>
+            <value id="14">COOL_WHITE_FLUORESCENT
+            <notes>W 3900 - 4500K</notes></value>
+            <value id="15">WHITE_FLUORESCENT
+            <notes>WW 3200 - 3700K</notes></value>
+            <value id="17">STANDARD_A</value>
+            <value id="18">STANDARD_B</value>
+            <value id="19">STANDARD_C</value>
+            <value id="20">D55</value>
+            <value id="21">D65</value>
+            <value id="22">D75</value>
+            <value id="23">D50</value>
+            <value id="24">ISO_STUDIO_TUNGSTEN</value>
+          </enum>
+          <description>
+          A reference illumination source roughly matching the current scene
+          illumination, which is used to describe the sensor color space
+          transformations.
+          </description>
+          <details>
+          The values in this tag correspond to the values defined for the
+          EXIF LightSource tag. These illuminants are standard light sources
+          that are often used for calibrating camera devices.
+          </details>
+          <tag id="DNG" />
+          <tag id="EXIF" />
+        </entry>
+        <entry name="calibrationTransform" type="rational"
+        visibility="public" optional="true"
+        type_notes="3x3 matrix in row-major-order" container="array">
+          <array>
+            <size>3</size>
+            <size>3</size>
+          </array>
+          <description>
+          A per-device calibration transform matrix to be applied after the
+          color space transform when rendering the raw image buffer.
+          </description>
+          <details>
+          This matrix is expressed as a 3x3 matrix in row-major-order, and
+          contains a per-device calibration transform that maps colors
+          from reference camera color space (i.e. the "golden module"
+          colorspace) into this camera device's linear native sensor color
+          space for the current scene illumination and white balance choice.
+          </details>
+          <tag id="DNG" />
+        </entry>
+        <entry name="colorTransform" type="rational"
+        visibility="public" optional="true"
+        type_notes="3x3 matrix in row-major-order" container="array">
+          <array>
+            <size>3</size>
+            <size>3</size>
+          </array>
+          <description>
+          A matrix that transforms color values from CIE XYZ color space to
+          reference camera color space when rendering the raw image buffer.
+          </description>
+          <details>
+          This matrix is expressed as a 3x3 matrix in row-major-order, and
+          contains a color transform matrix that maps colors from the CIE
+          XYZ color space to the reference camera raw color space (i.e. the
+          "golden module" colorspace) for the current scene illumination and
+          white balance choice.
+          </details>
+          <tag id="DNG" />
+        </entry>
+        <entry name="forwardMatrix" type="rational"
+        visibility="public" optional="true"
+        type_notes="3x3 matrix in row-major-order" container="array">
+          <array>
+            <size>3</size>
+            <size>3</size>
+          </array>
+          <description>
+          A matrix that transforms white balanced camera colors to the CIE XYZ
+          colorspace with a D50 whitepoint.
+          </description>
+          <details>
+          This matrix is expressed as a 3x3 matrix in row-major-order, and contains
+          a color transform matrix that maps a unit vector in the linear native
+          sensor color space to the D50 whitepoint in CIE XYZ color space.
+          </details>
+          <tag id="DNG" />
+        </entry>
         <entry name="neutralColorPoint" type="rational" visibility="public"
         optional="true" container="array">
           <array>
diff --git a/camera/include/system/camera_metadata_tags.h b/camera/include/system/camera_metadata_tags.h
index 8606337..fb4089c 100644
--- a/camera/include/system/camera_metadata_tags.h
+++ b/camera/include/system/camera_metadata_tags.h
@@ -274,20 +274,16 @@
     ANDROID_SENSOR_SENSITIVITY,                       // int32        | public
     ANDROID_SENSOR_BASE_GAIN_FACTOR,                  // rational     | public
     ANDROID_SENSOR_BLACK_LEVEL_PATTERN,               // int32[]      | public
-    ANDROID_SENSOR_CALIBRATION_TRANSFORM1,            // rational[]   | system
-    ANDROID_SENSOR_CALIBRATION_TRANSFORM2,            // rational[]   | system
-    ANDROID_SENSOR_COLOR_TRANSFORM1,                  // rational[]   | system
-    ANDROID_SENSOR_COLOR_TRANSFORM2,                  // rational[]   | system
-    ANDROID_SENSOR_FORWARD_MATRIX1,                   // rational[]   | system
-    ANDROID_SENSOR_FORWARD_MATRIX2,                   // rational[]   | system
     ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY,            // int32        | public
     ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS,          // float[]      | system
     ANDROID_SENSOR_ORIENTATION,                       // int32        | public
     ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS,    // int32[]      | public
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1,             // enum         | system
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT2,             // byte         | system
     ANDROID_SENSOR_TIMESTAMP,                         // int64        | public
     ANDROID_SENSOR_TEMPERATURE,                       // float        | public
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT,              // enum         | system
+    ANDROID_SENSOR_CALIBRATION_TRANSFORM,             // rational[]   | public
+    ANDROID_SENSOR_COLOR_TRANSFORM,                   // rational[]   | public
+    ANDROID_SENSOR_FORWARD_MATRIX,                    // rational[]   | public
     ANDROID_SENSOR_NEUTRAL_COLOR_POINT,               // rational[]   | public
     ANDROID_SENSOR_PROFILE_HUE_SAT_MAP,               // float[]      | public
     ANDROID_SENSOR_PROFILE_TONE_CURVE,                // float[]      | public
@@ -655,28 +651,28 @@
 } camera_metadata_enum_android_scaler_available_formats_t;
 
 
-// ANDROID_SENSOR_REFERENCE_ILLUMINANT1
-typedef enum camera_metadata_enum_android_sensor_reference_illuminant1 {
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT               = 1,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT            = 2,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN               = 3,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH                  = 4,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER           = 9,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER         = 10,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE                  = 11,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT   = 12,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT  = 13,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT = 14,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT      = 15,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A             = 17,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B             = 18,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C             = 19,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55                    = 20,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65                    = 21,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75                    = 22,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50                    = 23,
-    ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN    = 24,
-} camera_metadata_enum_android_sensor_reference_illuminant1_t;
+// ANDROID_SENSOR_REFERENCE_ILLUMINANT
+typedef enum camera_metadata_enum_android_sensor_reference_illuminant {
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAYLIGHT                = 1,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_FLUORESCENT             = 2,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_TUNGSTEN                = 3,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_FLASH                   = 4,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_FINE_WEATHER            = 9,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_CLOUDY_WEATHER          = 10,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_SHADE                   = 11,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAYLIGHT_FLUORESCENT    = 12,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAY_WHITE_FLUORESCENT   = 13,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_COOL_WHITE_FLUORESCENT  = 14,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_WHITE_FLUORESCENT       = 15,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_A              = 17,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_B              = 18,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_C              = 19,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_D55                     = 20,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_D65                     = 21,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_D75                     = 22,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_D50                     = 23,
+    ANDROID_SENSOR_REFERENCE_ILLUMINANT_ISO_STUDIO_TUNGSTEN     = 24,
+} camera_metadata_enum_android_sensor_reference_illuminant_t;
 
 // ANDROID_SENSOR_TEST_PATTERN_MODE
 typedef enum camera_metadata_enum_android_sensor_test_pattern_mode {
diff --git a/camera/src/camera_metadata_tag_info.c b/camera/src/camera_metadata_tag_info.c
index 60b1f32..e17d2b6 100644
--- a/camera/src/camera_metadata_tag_info.c
+++ b/camera/src/camera_metadata_tag_info.c
@@ -420,24 +420,6 @@
                 },
     [ ANDROID_SENSOR_BLACK_LEVEL_PATTERN - ANDROID_SENSOR_START ] =
     { "blackLevelPattern",             TYPE_INT32  },
-    [ ANDROID_SENSOR_CALIBRATION_TRANSFORM1 - ANDROID_SENSOR_START ] =
-    { "calibrationTransform1",         TYPE_RATIONAL
-                },
-    [ ANDROID_SENSOR_CALIBRATION_TRANSFORM2 - ANDROID_SENSOR_START ] =
-    { "calibrationTransform2",         TYPE_RATIONAL
-                },
-    [ ANDROID_SENSOR_COLOR_TRANSFORM1 - ANDROID_SENSOR_START ] =
-    { "colorTransform1",               TYPE_RATIONAL
-                },
-    [ ANDROID_SENSOR_COLOR_TRANSFORM2 - ANDROID_SENSOR_START ] =
-    { "colorTransform2",               TYPE_RATIONAL
-                },
-    [ ANDROID_SENSOR_FORWARD_MATRIX1 - ANDROID_SENSOR_START ] =
-    { "forwardMatrix1",                TYPE_RATIONAL
-                },
-    [ ANDROID_SENSOR_FORWARD_MATRIX2 - ANDROID_SENSOR_START ] =
-    { "forwardMatrix2",                TYPE_RATIONAL
-                },
     [ ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY - ANDROID_SENSOR_START ] =
     { "maxAnalogSensitivity",          TYPE_INT32  },
     [ ANDROID_SENSOR_NOISE_MODEL_COEFFICIENTS - ANDROID_SENSOR_START ] =
@@ -446,14 +428,21 @@
     { "orientation",                   TYPE_INT32  },
     [ ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS - ANDROID_SENSOR_START ] =
     { "profileHueSatMapDimensions",    TYPE_INT32  },
-    [ ANDROID_SENSOR_REFERENCE_ILLUMINANT1 - ANDROID_SENSOR_START ] =
-    { "referenceIlluminant1",          TYPE_BYTE   },
-    [ ANDROID_SENSOR_REFERENCE_ILLUMINANT2 - ANDROID_SENSOR_START ] =
-    { "referenceIlluminant2",          TYPE_BYTE   },
     [ ANDROID_SENSOR_TIMESTAMP - ANDROID_SENSOR_START ] =
     { "timestamp",                     TYPE_INT64  },
     [ ANDROID_SENSOR_TEMPERATURE - ANDROID_SENSOR_START ] =
     { "temperature",                   TYPE_FLOAT  },
+    [ ANDROID_SENSOR_REFERENCE_ILLUMINANT - ANDROID_SENSOR_START ] =
+    { "referenceIlluminant",           TYPE_BYTE   },
+    [ ANDROID_SENSOR_CALIBRATION_TRANSFORM - ANDROID_SENSOR_START ] =
+    { "calibrationTransform",          TYPE_RATIONAL
+                },
+    [ ANDROID_SENSOR_COLOR_TRANSFORM - ANDROID_SENSOR_START ] =
+    { "colorTransform",                TYPE_RATIONAL
+                },
+    [ ANDROID_SENSOR_FORWARD_MATRIX - ANDROID_SENSOR_START ] =
+    { "forwardMatrix",                 TYPE_RATIONAL
+                },
     [ ANDROID_SENSOR_NEUTRAL_COLOR_POINT - ANDROID_SENSOR_START ] =
     { "neutralColorPoint",             TYPE_RATIONAL
                 },
@@ -1669,24 +1658,6 @@
         case ANDROID_SENSOR_BLACK_LEVEL_PATTERN: {
             break;
         }
-        case ANDROID_SENSOR_CALIBRATION_TRANSFORM1: {
-            break;
-        }
-        case ANDROID_SENSOR_CALIBRATION_TRANSFORM2: {
-            break;
-        }
-        case ANDROID_SENSOR_COLOR_TRANSFORM1: {
-            break;
-        }
-        case ANDROID_SENSOR_COLOR_TRANSFORM2: {
-            break;
-        }
-        case ANDROID_SENSOR_FORWARD_MATRIX1: {
-            break;
-        }
-        case ANDROID_SENSOR_FORWARD_MATRIX2: {
-            break;
-        }
         case ANDROID_SENSOR_MAX_ANALOG_SENSITIVITY: {
             break;
         }
@@ -1699,81 +1670,87 @@
         case ANDROID_SENSOR_PROFILE_HUE_SAT_MAP_DIMENSIONS: {
             break;
         }
-        case ANDROID_SENSOR_REFERENCE_ILLUMINANT1: {
+        case ANDROID_SENSOR_TIMESTAMP: {
+            break;
+        }
+        case ANDROID_SENSOR_TEMPERATURE: {
+            break;
+        }
+        case ANDROID_SENSOR_REFERENCE_ILLUMINANT: {
             switch (value) {
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAYLIGHT:
                     msg = "DAYLIGHT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLUORESCENT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_FLUORESCENT:
                     msg = "FLUORESCENT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_TUNGSTEN:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_TUNGSTEN:
                     msg = "TUNGSTEN";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FLASH:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_FLASH:
                     msg = "FLASH";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_FINE_WEATHER:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_FINE_WEATHER:
                     msg = "FINE_WEATHER";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_CLOUDY_WEATHER:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_CLOUDY_WEATHER:
                     msg = "CLOUDY_WEATHER";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_SHADE:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_SHADE:
                     msg = "SHADE";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT_FLUORESCENT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAYLIGHT_FLUORESCENT:
                     msg = "DAYLIGHT_FLUORESCENT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_DAY_WHITE_FLUORESCENT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_DAY_WHITE_FLUORESCENT:
                     msg = "DAY_WHITE_FLUORESCENT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_COOL_WHITE_FLUORESCENT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_COOL_WHITE_FLUORESCENT:
                     msg = "COOL_WHITE_FLUORESCENT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_WHITE_FLUORESCENT:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_WHITE_FLUORESCENT:
                     msg = "WHITE_FLUORESCENT";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_A:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_A:
                     msg = "STANDARD_A";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_B:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_B:
                     msg = "STANDARD_B";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_STANDARD_C:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_STANDARD_C:
                     msg = "STANDARD_C";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D55:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_D55:
                     msg = "D55";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D65:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_D65:
                     msg = "D65";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D75:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_D75:
                     msg = "D75";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_D50:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_D50:
                     msg = "D50";
                     ret = 0;
                     break;
-                case ANDROID_SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN:
+                case ANDROID_SENSOR_REFERENCE_ILLUMINANT_ISO_STUDIO_TUNGSTEN:
                     msg = "ISO_STUDIO_TUNGSTEN";
                     ret = 0;
                     break;
@@ -1782,13 +1759,13 @@
             }
             break;
         }
-        case ANDROID_SENSOR_REFERENCE_ILLUMINANT2: {
+        case ANDROID_SENSOR_CALIBRATION_TRANSFORM: {
             break;
         }
-        case ANDROID_SENSOR_TIMESTAMP: {
+        case ANDROID_SENSOR_COLOR_TRANSFORM: {
             break;
         }
-        case ANDROID_SENSOR_TEMPERATURE: {
+        case ANDROID_SENSOR_FORWARD_MATRIX: {
             break;
         }
         case ANDROID_SENSOR_NEUTRAL_COLOR_POINT: {