Merge "Update properties' config"
diff --git a/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
index 74946a5..32e9a7f 100644
--- a/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.0/vts/functional/GeneratedTestsV1_0.cpp
@@ -42,7 +42,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_0/all_generated_V1_0_vts_tests.cpp"
 
 }  // namespace functional
 }  // namespace vts
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
index 10cf5a9..23e6534 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_0.cpp
@@ -43,7 +43,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_1/all_generated_V1_0_vts_tests.cpp"
 
 }  // namespace functional
 }  // namespace vts
diff --git a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
index 079c18c..680b93a 100644
--- a/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
+++ b/neuralnetworks/1.1/vts/functional/GeneratedTestsV1_1.cpp
@@ -43,7 +43,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_1_vts_tests.cpp"
+#include "vts/V1_1/all_generated_V1_1_vts_tests.cpp"
 
 }  // namespace functional
 }  // namespace vts
diff --git a/neuralnetworks/1.2/vts/functional/Android.bp b/neuralnetworks/1.2/vts/functional/Android.bp
index b48646f..31b8532 100644
--- a/neuralnetworks/1.2/vts/functional/Android.bp
+++ b/neuralnetworks/1.2/vts/functional/Android.bp
@@ -56,9 +56,6 @@
         "GeneratedTestsV1_0.cpp",
         "ValidateBurst.cpp",
     ],
-    cflags: [
-        "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
-    ],
 }
 
 // Tests for V1_1 models using the V1_2 HAL.
@@ -69,9 +66,6 @@
         "GeneratedTestsV1_1.cpp",
         "ValidateBurst.cpp",
     ],
-    cflags: [
-        "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
-    ],
 }
 
 // Tests for V1_2 models.
@@ -84,9 +78,6 @@
         "GeneratedTestsV1_2.cpp",
         "ValidateBurst.cpp",
     ],
-    cflags: [
-        "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE"
-    ],
 }
 
 cc_test {
@@ -98,7 +89,6 @@
         "ValidateBurst.cpp",
     ],
     cflags: [
-        "-DNN_TEST_DYNAMIC_OUTPUT_SHAPE",
         "-DPRESUBMIT_NOT_VTS",
     ],
 }
diff --git a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
index 9cabb7b..adbf224 100644
--- a/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
+++ b/neuralnetworks/1.2/vts/functional/CompilationCachingTests.cpp
@@ -50,7 +50,7 @@
 
 // In frameworks/ml/nn/runtime/test/generated/, creates a hidl model of float32 mobilenet.
 #include "examples/mobilenet_224_gender_basic_fixed.example.cpp"
-#include "vts_models/mobilenet_224_gender_basic_fixed.model.cpp"
+#include "vts/V1_2/models/mobilenet_224_gender_basic_fixed.model.cpp"
 
 // Prevent the compiler from complaining about an otherwise unused function.
 [[maybe_unused]] auto dummy_createTestModel = createTestModel_dynamic_output_shape;
@@ -73,7 +73,7 @@
 
 // In frameworks/ml/nn/runtime/test/generated/, creates a hidl model of quant8 mobilenet.
 #include "examples/mobilenet_quantized.example.cpp"
-#include "vts_models/mobilenet_quantized.model.cpp"
+#include "vts/V1_2/models/mobilenet_quantized.model.cpp"
 
 // Prevent the compiler from complaining about an otherwise unused function.
 [[maybe_unused]] auto dummy_createTestModel = createTestModel_dynamic_output_shape;
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
index d48c73e..b4e6696 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_0.cpp
@@ -42,7 +42,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_0_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_0_vts_tests.cpp"
 
 }  // namespace functional
 }  // namespace vts
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
index 1adb371..33212fb 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_1.cpp
@@ -42,7 +42,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_1_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_1_vts_tests.cpp"
 
 }  // namespace functional
 }  // namespace vts
diff --git a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
index f9cecf8..8481b4d 100644
--- a/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
+++ b/neuralnetworks/1.2/vts/functional/GeneratedTestsV1_2.cpp
@@ -42,7 +42,7 @@
 std::vector<Request> createRequests(const std::vector<MixedTypedExample>& examples);
 
 // in frameworks/ml/nn/runtime/tests/generated/
-#include "all_generated_V1_2_vts_tests.cpp"
+#include "vts/V1_2/all_generated_V1_2_vts_tests.cpp"
 
 // Generated from spec/strided_slice_invalid_output_dims.mod.py.
 // TODO(b/132155416): Make this part of all_generated_V1_2_vts_tests.cpp.
diff --git a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
index 26f2c90..f81af9b 100644
--- a/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.4/vts/functional/radio_hidl_hal_api.cpp
@@ -169,6 +169,11 @@
 
 /*
  * Test IRadio.startNetworkScan() for the response returned.
+ *
+ * REQUEST_NOT_SUPPORTED is temporarily returned because of vendors failed to fully implement
+ * startNetworkScan in HAL @1.4 (see b/137298570 and b/135595082). Starting from @1.5, however,
+ * REQUEST_NOT_SUPPORTED will be disallowed for all tests. Modems have "GSM" rat scan need to
+ * support scanning requests combined with some parameters.
  */
 TEST_F(RadioHidlTest_v1_4, startNetworkScan) {
     serial = GetRandomSerialNumber();
@@ -191,10 +196,17 @@
     if (cardStatus.base.base.cardState == CardState::ABSENT) {
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::SIM_ABSENT}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        // OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do not support the
-        // required manual GSM search functionality. This is tracked in b/112206766.
-        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
-                                     {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED}));
+      // OPERATION_NOT_ALLOWED should not be allowed; however, some vendors do
+      // not support the required manual GSM search functionality. This is
+      // tracked in b/112206766. REQUEST_NOT_SUPPORTED is temporarily added back
+      // because of vendors failed to implement startNetworkScan in HAL 1.4 (see
+      // b/137298570 and b/135595082). Starting from 1.5, however,
+      // REQUEST_NOT_SUPPORTED will be disallowed. Modems have "GSM" rat scan
+      // need to support scanning requests combined with some parameters.
+      ASSERT_TRUE(
+          CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                           {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
+                            RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -220,8 +232,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -256,8 +269,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -291,8 +305,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -326,8 +341,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -361,8 +377,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -396,8 +413,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -431,8 +449,9 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::SIM_ABSENT, RadioError::INVALID_ARGUMENTS}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(
-                CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error, {RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(CheckAnyOfErrors(
+          radioRsp_v1_4->rspInfo.error,
+          {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -468,8 +487,10 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::NONE, RadioError::SIM_ABSENT}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
-                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(
+          CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                           {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                            RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
@@ -507,8 +528,10 @@
         ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
                                      {RadioError::NONE, RadioError::SIM_ABSENT}));
     } else if (cardStatus.base.base.cardState == CardState::PRESENT) {
-        ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
-                                     {RadioError::NONE, RadioError::INVALID_ARGUMENTS}));
+      ASSERT_TRUE(
+          CheckAnyOfErrors(radioRsp_v1_4->rspInfo.error,
+                           {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
+                            RadioError::REQUEST_NOT_SUPPORTED}));
     }
 }
 
diff --git a/thermal/2.0/default/android.hardware.thermal@2.0-service.rc b/thermal/2.0/default/android.hardware.thermal@2.0-service.rc
index 046c771..4ff8bd6 100644
--- a/thermal/2.0/default/android.hardware.thermal@2.0-service.rc
+++ b/thermal/2.0/default/android.hardware.thermal@2.0-service.rc
@@ -1,4 +1,5 @@
 service vendor.thermal-hal-2-0-mock /vendor/bin/hw/android.hardware.thermal@2.0-service.mock
+    interface android.hardware.thermal@1.0::IThermal default
     interface android.hardware.thermal@2.0::IThermal default
     class hal
     user system
diff --git a/tv/cec/1.0/config/sadConfig.xsd b/tv/cec/1.0/config/sadConfig.xsd
new file mode 100644
index 0000000..7f99311
--- /dev/null
+++ b/tv/cec/1.0/config/sadConfig.xsd
@@ -0,0 +1,86 @@
+<?xml version="1.0"?>
+<!-- Copyright (C) 2019 The Android Open Source Project
+
+         Licensed under the Apache License, Version 2.0 (the "License");
+         you may not use this file except in compliance with the License.
+         You may obtain a copy of the License at
+
+                    http://www.apache.org/licenses/LICENSE-2.0
+
+         Unless required by applicable law or agreed to in writing, software
+         distributed under the License is distributed on an "AS IS" BASIS,
+         WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+         See the License for the specific language governing permissions and
+         limitations under the License.
+-->
+<xs:schema version="1.0"
+           xmlns:xs="http://www.w3.org/2001/XMLSchema">
+    <xs:include schemaLocation="../../../../audio/4.0/config/audio_policy_configuration.xsd"/>
+    <xs:complexType name="config">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">
+                List the config versions supported by Short Audio Descriptor(SAD) config.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="device" type="device" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="version" type="version"/>
+    </xs:complexType>
+    <xs:complexType name="device">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">
+                Device section:
+                There is a list of configurations in this SAD config for all the input audio
+                devices that the current Android device supports.
+                Each device has the following attributes:
+                    "type": type of the audio device.
+                And the following element
+                    <supportedFormat/>: the supported format info of the device. There can be
+                                        multiple formats supported by one audio device.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:sequence>
+            <xs:element name="supportedFormat" type="supportedFormat" minOccurs="0" maxOccurs="unbounded"/>
+        </xs:sequence>
+        <xs:attribute name="type" type="extendableAudioDevice" use="required"/>
+    </xs:complexType>
+    <xs:complexType name="supportedFormat">
+        <xs:annotation>
+            <xs:documentation xml:lang="en">
+                SupportedFormat section:
+                The details of the short audio descriptor of a specific audio format
+                supported by the audio device. Attributes as follows:
+                    "format": format enum of the current supported format.
+                    "descriptor": three-byte short audio descriptor for the given format in hex.
+            </xs:documentation>
+        </xs:annotation>
+        <xs:attribute name="format" type="hdmiAudioFormat" use="required"/>
+        <xs:attribute name="descriptor" type="descriptor" use="required"/>
+    </xs:complexType>
+    <xs:simpleType name="descriptor">
+        <xs:restriction base="xs:string">
+            <xs:pattern value="[a-fA-F0-9]{6}"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:simpleType name="hdmiAudioFormat">
+        <xs:restriction base="xs:string">
+            <xs:enumeration value="AUDIO_FORMAT_NONE"/>
+            <xs:enumeration value="AUDIO_FORMAT_LPCM"/>
+            <xs:enumeration value="AUDIO_FORMAT_DD"/>
+            <xs:enumeration value="AUDIO_FORMAT_MPEG1"/>
+            <xs:enumeration value="AUDIO_FORMAT_MP3"/>
+            <xs:enumeration value="AUDIO_FORMAT_MPEG2"/>
+            <xs:enumeration value="AUDIO_FORMAT_AAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_DTS"/>
+            <xs:enumeration value="AUDIO_FORMAT_ATRAC"/>
+            <xs:enumeration value="AUDIO_FORMAT_ONEBITAUDIO"/>
+            <xs:enumeration value="AUDIO_FORMAT_DDP"/>
+            <xs:enumeration value="AUDIO_FORMAT_DTSHD"/>
+            <xs:enumeration value="AUDIO_FORMAT_TRUEHD"/>
+            <xs:enumeration value="AUDIO_FORMAT_DST"/>
+            <xs:enumeration value="AUDIO_FORMAT_WMAPRO"/>
+        </xs:restriction>
+    </xs:simpleType>
+    <xs:element name="config" type="config"/>
+</xs:schema>