Merge "Document how HVAC_AUTO_ON can be indirectly disabled" into udc-dev
diff --git a/automotive/evs/aidl/android/hardware/automotive/evs/ExposureParameters.aidl b/automotive/evs/aidl/android/hardware/automotive/evs/ExposureParameters.aidl
index 6a85ade..e644fed 100644
--- a/automotive/evs/aidl/android/hardware/automotive/evs/ExposureParameters.aidl
+++ b/automotive/evs/aidl/android/hardware/automotive/evs/ExposureParameters.aidl
@@ -42,7 +42,7 @@
     /** Remainder exposure time in clocks. */
     long fineIntegrationTimeInPixelClocks;
     /**
-     * Logarthm value of coarse integration time multiplier.
+     * Logarithm value of coarse integration time multiplier.
      */
     int coarseIntegrationTimeLShift;
 }
diff --git a/automotive/evs/aidl/android/hardware/automotive/evs/GridStatistics.aidl b/automotive/evs/aidl/android/hardware/automotive/evs/GridStatistics.aidl
index e66c51e..57f72ea 100644
--- a/automotive/evs/aidl/android/hardware/automotive/evs/GridStatistics.aidl
+++ b/automotive/evs/aidl/android/hardware/automotive/evs/GridStatistics.aidl
@@ -25,7 +25,7 @@
  */
 @VintfStability
 parcelable GridStatistics {
-    /** */
+    /** Descriptors of grid statistics in shared memory. */
     GridStatisticDesc[] descriptors;
     /**
      * Shared memory object containing one or more grid statistics.
diff --git a/compatibility_matrices/compatibility_matrix.8.xml b/compatibility_matrices/compatibility_matrix.8.xml
index 310eaa1..8ee86cc 100644
--- a/compatibility_matrices/compatibility_matrix.8.xml
+++ b/compatibility_matrices/compatibility_matrix.8.xml
@@ -80,7 +80,6 @@
         <name>android.hardware.automotive.evs</name>
         <interface>
             <name>IEvsEnumerator</name>
-            <instance>default</instance>
             <regex-instance>[a-z]+/[0-9]+</regex-instance>
         </interface>
     </hal>
diff --git a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
index ab67eb1..9ae6173 100644
--- a/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
+++ b/graphics/composer/2.1/utils/hal/include/composer-hal/2.1/ComposerCommandEngine.h
@@ -207,7 +207,7 @@
 
     bool executeSetClientTarget(uint16_t length) {
         // 4 parameters followed by N rectangles
-        if ((length - 4) % 4 != 0) {
+        if (!length || (length - 4) % 4 != 0) {
             return false;
         }
 
diff --git a/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h b/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h
index afc22d8..5e9a287 100644
--- a/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h
+++ b/graphics/composer/2.3/utils/command-buffer/include/composer-command-buffer/2.3/ComposerCommandBuffer.h
@@ -87,6 +87,10 @@
             return;
         }
 
+        if (metadata.size() == 0) {
+            return;
+        }
+
         // space for numElements
         commandLength += 1;
 
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
index 22020c0..4a5ac69 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientWriter.h
@@ -144,10 +144,8 @@
 
     void setLayerBufferSlotsToClear(int64_t display, int64_t layer,
                                     const std::vector<uint32_t>& slotsToClear) {
-        LayerCommand& layerCommand = getLayerCommand(display, layer);
-        for (auto slot : slotsToClear) {
-            layerCommand.bufferSlotsToClear.emplace(static_cast<int32_t>(slot));
-        }
+        getLayerCommand(display, layer)
+                .bufferSlotsToClear.emplace(slotsToClear.begin(), slotsToClear.end());
     }
 
     void setLayerSurfaceDamage(int64_t display, int64_t layer, const std::vector<Rect>& damage) {