Merge "security: see: hdcp: add HDCP Auth Control interface" into main
diff --git a/compatibility_matrices/compatibility_matrix.202504.xml b/compatibility_matrices/compatibility_matrix.202504.xml
index a728680..8d5a50a 100644
--- a/compatibility_matrices/compatibility_matrix.202504.xml
+++ b/compatibility_matrices/compatibility_matrix.202504.xml
@@ -543,7 +543,7 @@
     </hal>
     <hal format="aidl">
         <name>android.hardware.sensors</name>
-        <version>2</version>
+        <version>2-3</version>
         <interface>
             <name>ISensors</name>
             <instance>default</instance>
@@ -653,6 +653,15 @@
         </interface>
     </hal>
     <hal format="aidl">
+      <name>android.hardware.virtualization.capabilities</name>
+        <version>1</version>
+        <interface>
+            <name>IVmCapabilitiesService</name>
+            <instance>default</instance>
+            <instance>noop</instance>
+        </interface>
+    </hal>
+    <hal format="aidl">
         <name>android.hardware.weaver</name>
         <version>2</version>
         <interface>
diff --git a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
index df31618..f6b32d0 100644
--- a/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
+++ b/power/aidl/aidl_api/android.hardware.power/current/android/hardware/power/SessionHint.aidl
@@ -42,4 +42,6 @@
   GPU_LOAD_UP = 5,
   GPU_LOAD_DOWN = 6,
   GPU_LOAD_RESET = 7,
+  CPU_LOAD_SPIKE = 8,
+  GPU_LOAD_SPIKE = 9,
 }
diff --git a/power/aidl/android/hardware/power/SessionHint.aidl b/power/aidl/android/hardware/power/SessionHint.aidl
index 1a8c505..1b8a3dd 100644
--- a/power/aidl/android/hardware/power/SessionHint.aidl
+++ b/power/aidl/android/hardware/power/SessionHint.aidl
@@ -72,4 +72,18 @@
      * baseline to prepare for an arbitrary load, and must wake up if inactive.
      */
     GPU_LOAD_RESET = 7,
+
+    /**
+     * This hint indicates an upcoming CPU workload that is abnormally large and
+     * not representative of the workload. This should be used for rare, one-time
+     * operations and should be ignored by any load tracking or session hysteresis.
+     */
+    CPU_LOAD_SPIKE = 8,
+
+    /**
+     * This hint indicates an upcoming GPU workload that is abnormally large and
+     * not representative of the workload. This should be used for rare, one-time
+     * operations and should be ignored by any load tracking or session hysteresis.
+     */
+    GPU_LOAD_SPIKE = 9,
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
index bba6bdd..ded4835 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfig.aidl
@@ -53,4 +53,6 @@
   oneway void setResponseFunctions(in android.hardware.radio.config.IRadioConfigResponse radioConfigResponse, in android.hardware.radio.config.IRadioConfigIndication radioConfigIndication);
   oneway void setSimSlotsMapping(in int serial, in android.hardware.radio.config.SlotPortMapping[] slotMap);
   oneway void getSimultaneousCallingSupport(in int serial);
+  oneway void getSimTypeInfo(in int serial);
+  oneway void setSimType(in int serial, in android.hardware.radio.config.SimType[] simTypes);
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
index 6ff7bd0..4e0e133 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -43,4 +43,6 @@
   oneway void setPreferredDataModemResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void setSimSlotsMappingResponse(in android.hardware.radio.RadioResponseInfo info);
   oneway void getSimultaneousCallingSupportResponse(in android.hardware.radio.RadioResponseInfo info, in int[] enabledLogicalSlots);
+  oneway void getSimTypeInfoResponse(in android.hardware.radio.RadioResponseInfo info, in android.hardware.radio.config.SimTypeInfo[] simTypeInfo);
+  oneway void setSimTypeResponse(in android.hardware.radio.RadioResponseInfo info);
 }
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
similarity index 88%
copy from tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
index 9509006..b27c86f 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimType.aidl
@@ -31,8 +31,11 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.hardware.tv.mediaquality;
-@VintfStability
-interface ISoundParametersCallback {
-  android.hardware.tv.mediaquality.SoundParameters getSoundParameters(long SoundProfileId);
+package android.hardware.radio.config;
+/* @hide */
+@Backing(type="int") @JavaDerive(toString=true) @VintfStability
+enum SimType {
+  UNKNOWN = 0,
+  PHYSICAL = (1 << 0) /* 1 */,
+  ESIM = (1 << 1) /* 2 */,
 }
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
similarity index 86%
copy from tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
copy to radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
index 9509006..cba5dd9 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.config/current/android/hardware/radio/config/SimTypeInfo.aidl
@@ -31,8 +31,10 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.hardware.tv.mediaquality;
-@VintfStability
-interface ISoundParametersCallback {
-  android.hardware.tv.mediaquality.SoundParameters getSoundParameters(long SoundProfileId);
+package android.hardware.radio.config;
+/* @hide */
+@JavaDerive(toString=true) @VintfStability
+parcelable SimTypeInfo {
+  android.hardware.radio.config.SimType currentSimType = android.hardware.radio.config.SimType.UNKNOWN;
+  int supportedSimTypes;
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
index 17d3fda..1f8cbdc 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.data/current/android/hardware/radio/data/DataCallFailCause.aidl
@@ -169,6 +169,9 @@
   MAX_PPP_INACTIVITY_TIMER_EXPIRED = 0x7FE,
   IPV6_ADDRESS_TRANSFER_FAILED = 0x7FF,
   TRAT_SWAP_FAILED = 0x800,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   EHRPD_TO_HRPD_FALLBACK = 0x801,
   MIP_CONFIG_FAILURE = 0x802,
   PDN_INACTIVITY_TIMER_EXPIRED = 0x803,
diff --git a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
index e9937f0..33c0d70 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.modem/current/android/hardware/radio/modem/ResetNvType.aidl
@@ -36,6 +36,12 @@
 @Backing(type="int") @JavaDerive(toString=true) @SuppressWarnings(value={"redundant-name"}) @VintfStability
 enum ResetNvType {
   RELOAD,
+  /**
+   * @deprecated NV APIs are deprecated starting from Android U.
+   */
   ERASE,
+  /**
+   * @deprecated NV APIs are deprecated starting from Android U.
+   */
   FACTORY_RESET,
 }
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
index b400bbe..f44385a 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioAccessFamily.aidl
@@ -39,7 +39,13 @@
   GPRS = (1 << android.hardware.radio.RadioTechnology.GPRS) /* 2 */,
   EDGE = (1 << android.hardware.radio.RadioTechnology.EDGE) /* 4 */,
   UMTS = (1 << android.hardware.radio.RadioTechnology.UMTS) /* 8 */,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   IS95A = (1 << android.hardware.radio.RadioTechnology.IS95A) /* 16 */,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   IS95B = (1 << android.hardware.radio.RadioTechnology.IS95B) /* 32 */,
   /**
    * @deprecated Legacy CDMA is unsupported.
@@ -60,6 +66,9 @@
    * @deprecated Legacy CDMA is unsupported.
    */
   EVDO_B = (1 << android.hardware.radio.RadioTechnology.EVDO_B) /* 4096 */,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   EHRPD = (1 << android.hardware.radio.RadioTechnology.EHRPD) /* 8192 */,
   LTE = (1 << android.hardware.radio.RadioTechnology.LTE) /* 16384 */,
   HSPAP = (1 << android.hardware.radio.RadioTechnology.HSPAP) /* 32768 */,
diff --git a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
index 7d2d08c..7aae601 100644
--- a/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio/current/android/hardware/radio/RadioTechnology.aidl
@@ -39,7 +39,13 @@
   GPRS,
   EDGE,
   UMTS,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   IS95A,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   IS95B,
   /**
    * @deprecated Legacy CDMA is unsupported.
@@ -60,6 +66,9 @@
    * @deprecated Legacy CDMA is unsupported.
    */
   EVDO_B,
+  /**
+   * @deprecated Legacy CDMA is unsupported.
+   */
   EHRPD,
   LTE,
   HSPAP,
diff --git a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
index 6d38d59..9588ed9 100644
--- a/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
+++ b/radio/aidl/android/hardware/radio/RadioAccessFamily.aidl
@@ -27,7 +27,9 @@
     GPRS = 1 << RadioTechnology.GPRS,
     EDGE = 1 << RadioTechnology.EDGE,
     UMTS = 1 << RadioTechnology.UMTS,
+    /** @deprecated Legacy CDMA is unsupported. */
     IS95A = 1 << RadioTechnology.IS95A,
+    /** @deprecated Legacy CDMA is unsupported. */
     IS95B = 1 << RadioTechnology.IS95B,
     /** @deprecated Legacy CDMA is unsupported. */
     ONE_X_RTT = 1 << RadioTechnology.ONE_X_RTT,
@@ -40,6 +42,7 @@
     HSPA = 1 << RadioTechnology.HSPA,
     /** @deprecated Legacy CDMA is unsupported. */
     EVDO_B = 1 << RadioTechnology.EVDO_B,
+    /** @deprecated Legacy CDMA is unsupported. */
     EHRPD = 1 << RadioTechnology.EHRPD,
     LTE = 1 << RadioTechnology.LTE,
     HSPAP = 1 << RadioTechnology.HSPAP,
diff --git a/radio/aidl/android/hardware/radio/RadioTechnology.aidl b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
index cd82ef5..de93a2b 100644
--- a/radio/aidl/android/hardware/radio/RadioTechnology.aidl
+++ b/radio/aidl/android/hardware/radio/RadioTechnology.aidl
@@ -25,7 +25,9 @@
     GPRS,
     EDGE,
     UMTS,
+    /** @deprecated Legacy CDMA is unsupported. */
     IS95A,
+    /** @deprecated Legacy CDMA is unsupported. */
     IS95B,
     /** @deprecated Legacy CDMA is unsupported. */
     ONE_X_RTT,
@@ -38,6 +40,7 @@
     HSPA,
     /** @deprecated Legacy CDMA is unsupported. */
     EVDO_B,
+    /** @deprecated Legacy CDMA is unsupported. */
     EHRPD,
     LTE,
     /**
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
index 936315c..e819fe0 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfig.aidl
@@ -27,6 +27,7 @@
 
 import android.hardware.radio.config.IRadioConfigIndication;
 import android.hardware.radio.config.IRadioConfigResponse;
+import android.hardware.radio.config.SimType;
 import android.hardware.radio.config.SlotPortMapping;
 
 /** @hide */
@@ -208,4 +209,39 @@
      * This is available when android.hardware.telephony is defined.
      */
     void getSimultaneousCallingSupport(in int serial);
+
+    /**
+     * Get the sim type information.
+     *
+     * Response provides the current active sim type and supported sim types associated with each
+     * active physical slot ids.
+     *
+     * @param serial Serial number of request.
+     *
+     * Response callback is IRadioConfigResponse.getSimTypeInfoResponse()
+     *
+     * This is available when android.hardware.telephony.subscription is defined.
+     */
+    void getSimTypeInfo(in int serial);
+
+    /**
+     * Set the sim type associated with the physical slot id and activate if the sim type is
+     * currently inactive.
+     *
+     * Example: There are 2 active physical slot ids and 3 physical sims(2 pSIM and 1 eSIM). First
+     * physical slot id is always linked pSIM and 2nd physical slot id supports either pSIM/eSIM one
+     * at a time. In order to activate eSIM on 2nd physical slot id, caller should pass
+     * corresponding sim type.
+     *
+     * simTypes[0] = pSIM
+     * simTypes[1] = eSIM
+     *
+     * @param serial Serial number of request.
+     * @param simTypes SimType to be activated on each logical slot
+     *
+     * Response callback is IRadioConfigResponse.setSimTypeResponse()
+     *
+     * This is available when android.hardware.telephony.subscription is defined.
+     */
+    void setSimType(in int serial, in SimType[] simTypes);
 }
diff --git a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
index 8182cd1..d526c51 100644
--- a/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
+++ b/radio/aidl/android/hardware/radio/config/IRadioConfigResponse.aidl
@@ -18,6 +18,7 @@
 
 import android.hardware.radio.config.PhoneCapability;
 import android.hardware.radio.config.SimSlotStatus;
+import android.hardware.radio.config.SimTypeInfo;
 
 /**
  * Interface declaring response functions to solicited radio config requests.
@@ -152,4 +153,40 @@
      */
     void getSimultaneousCallingSupportResponse(
             in android.hardware.radio.RadioResponseInfo info, in int[] enabledLogicalSlots);
+
+    /**
+     * Response to the asynchronous {@link IRadioConfig#getSimTypeInfo} request.
+     *
+     * @param info Response info struct containing response type, serial number and error
+     * @param simTypeInfos Currently active and supported sim types associated with active
+     * physical slot ids.
+     *
+     * Valid errors returned:
+     *   RadioError:REQUEST_NOT_SUPPORTED when android.hardware.telephony.subscription is not
+     *                                    defined
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:NO_MEMORY
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:MODEM_ERR
+     */
+    void getSimTypeInfoResponse(
+            in android.hardware.radio.RadioResponseInfo info, in SimTypeInfo[] simTypeInfo);
+
+    /**
+     * Response to the asynchronous {@link IRadioConfig#setSimType} request.
+     *
+     * @param info Response info struct containing response type, serial number and error
+     *
+     * Valid errors returned:
+     *   RadioError:REQUEST_NOT_SUPPORTED when android.hardware.telephony.subscription is not
+     *                                    defined
+     *   RadioError:NONE
+     *   RadioError:RADIO_NOT_AVAILABLE
+     *   RadioError:NO_MEMORY
+     *   RadioError:INTERNAL_ERR
+     *   RadioError:INVALID_ARGUMENTS
+     *   RadioError:MODEM_ERR
+     */
+    void setSimTypeResponse(in android.hardware.radio.RadioResponseInfo info);
 }
diff --git a/radio/aidl/android/hardware/radio/config/SimType.aidl b/radio/aidl/android/hardware/radio/config/SimType.aidl
new file mode 100644
index 0000000..fc9915e
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/config/SimType.aidl
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.radio.config;
+
+/** @hide */
+@VintfStability
+@Backing(type="int")
+@JavaDerive(toString=true)
+enum SimType {
+    /**
+     * Unknown
+     **/
+    UNKNOWN = 0,
+    /**
+     * Physical SIM (can be eUICC capable)
+     **/
+    PHYSICAL = 1 << 0,
+    /**
+     * Embedded SIM
+     **/
+    ESIM = 1 << 1,
+}
diff --git a/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl b/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl
new file mode 100644
index 0000000..0534626
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/config/SimTypeInfo.aidl
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.radio.config;
+
+import android.hardware.radio.config.SimType;
+
+/** @hide */
+@VintfStability
+@JavaDerive(toString=true)
+parcelable SimTypeInfo {
+    /**
+     * Current SimType on the physical slot id.
+     **/
+    SimType currentSimType = SimType.UNKNOWN;
+    /**
+     * Bitmask of the sim types supported by the physical slot id. Physical slot can support more
+     * than one SimType.
+     * Example:
+     * if the physical slot id supports either pSIM/eSIM and currently pSIM is active,
+     * currentSimType will be SimType::PHYSICAL and supportedSimTypes will be
+     * SimType::PHYSICAL | SimType::ESIM.
+     **/
+    int supportedSimTypes;
+}
diff --git a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
index 5ae057a..592fde6 100644
--- a/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
+++ b/radio/aidl/android/hardware/radio/data/DataCallFailCause.aidl
@@ -421,6 +421,7 @@
     TRAT_SWAP_FAILED = 0x800,
     /**
      * Device falls back from eHRPD to HRPD.
+     * @deprecated Legacy CDMA is unsupported.
      */
     EHRPD_TO_HRPD_FALLBACK = 0x801,
     /**
diff --git a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
index 491657c..15a833e 100644
--- a/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
+++ b/radio/aidl/android/hardware/radio/modem/IRadioModem.aidl
@@ -139,12 +139,13 @@
     void nvReadItem(in int serial, in NvItem itemId);
 
     /**
-     * Reset the radio NV configuration.
+     * Reboots modem.
      *
-     * This is also used to reboot the modem with ResetNvType.RELOAD.
+     * This was historically used to reset NV configuration, but starting from Android U, NV APIs
+     * are deprecated.
      *
      * @param serial Serial number of request.
-     * @param resetType Type of reset operation
+     * @param resetType Always ResetNvType.RELOAD.
      *
      * Response function is IRadioModemResponse.nvResetConfigResponse()
      */
diff --git a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
index 71736d8..95fa0d7 100644
--- a/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
+++ b/radio/aidl/android/hardware/radio/modem/ResetNvType.aidl
@@ -25,15 +25,21 @@
 @SuppressWarnings(value={"redundant-name"})
 enum ResetNvType {
     /**
-     * Reload all NV items. This may reboot modem.
+     * Reboot modem.
+     *
+     * Historically, this has been also reloading all NV items.
      */
     RELOAD,
     /**
      * Erase NV reset (SCRTN)
+     *
+     * @deprecated NV APIs are deprecated starting from Android U.
      */
     ERASE,
     /**
      * Factory reset (RTN)
+     *
+     * @deprecated NV APIs are deprecated starting from Android U.
      */
     FACTORY_RESET,
 }
diff --git a/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp b/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
index 837c626..3834ecc 100644
--- a/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
+++ b/radio/aidl/compat/libradiocompat/config/RadioConfig.cpp
@@ -109,4 +109,19 @@
     return ok();
 }
 
+ScopedAStatus RadioConfig::getSimTypeInfo(int32_t serial) {
+    LOG_CALL << serial;
+    LOG(ERROR) << " getSimTypeInfo is unsupported by HIDL HALs";
+    respond()->getSimTypeInfoResponse(notSupported(serial), {});
+    return ok();
+}
+
+ScopedAStatus RadioConfig::setSimType(
+        int32_t serial, const std::vector<aidl::SimType>& /*simTypes*/) {
+    LOG_CALL << serial;
+    LOG(ERROR) << " setSimType is unsupported by HIDL HALs";
+    respond()->setSimTypeResponse(notSupported(serial));
+    return ok();
+}
+
 }  // namespace android::hardware::radio::compat
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
index 17d5985..a1e48dc 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioConfig.h
@@ -55,7 +55,11 @@
             int32_t serial,
             const std::vector<aidl::android::hardware::radio::config::SlotPortMapping>& slotMap)
             override;
-
+    ::ndk::ScopedAStatus getSimTypeInfo(int32_t serial) override;
+    ::ndk::ScopedAStatus setSimType(
+            int32_t serial,
+            const std::vector<aidl::android::hardware::radio::config::SimType>& simTypes)
+            override;
   protected:
     std::shared_ptr<::aidl::android::hardware::radio::config::IRadioConfigResponse> respond();
 
diff --git a/radio/aidl/vts/radio_config_response.cpp b/radio/aidl/vts/radio_config_response.cpp
index c532440..49439fa 100644
--- a/radio/aidl/vts/radio_config_response.cpp
+++ b/radio/aidl/vts/radio_config_response.cpp
@@ -75,3 +75,17 @@
     parent_config.notify(info.serial);
     return ndk::ScopedAStatus::ok();
 }
+
+ndk::ScopedAStatus RadioConfigResponse::getSimTypeInfoResponse(const RadioResponseInfo& info,
+        const std::vector<SimTypeInfo>& /* simTypeInfo */) {
+    rspInfo = info;
+    parent_config.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
+
+ndk::ScopedAStatus RadioConfigResponse::setSimTypeResponse(const RadioResponseInfo& info) {
+    rspInfo = info;
+    parent_config.notify(info.serial);
+    return ndk::ScopedAStatus::ok();
+}
+
diff --git a/radio/aidl/vts/radio_config_utils.h b/radio/aidl/vts/radio_config_utils.h
index 84c74fc..cdcc1bc 100644
--- a/radio/aidl/vts/radio_config_utils.h
+++ b/radio/aidl/vts/radio_config_utils.h
@@ -62,6 +62,11 @@
 
     virtual ndk::ScopedAStatus getHalDeviceCapabilitiesResponse(
             const RadioResponseInfo& info, bool modemReducedFeatureSet1) override;
+
+    virtual ndk::ScopedAStatus getSimTypeInfoResponse(
+            const RadioResponseInfo& info, const std::vector<SimTypeInfo>& simTypeInfo) override;
+
+    virtual ndk::ScopedAStatus setSimTypeResponse(const RadioResponseInfo& info) override;
 };
 
 /* Callback class for radio config indication */
diff --git a/sensors/aidl/Android.bp b/sensors/aidl/Android.bp
index 8877e6e..63ace90 100644
--- a/sensors/aidl/Android.bp
+++ b/sensors/aidl/Android.bp
@@ -43,6 +43,6 @@
         },
 
     ],
-    frozen: true,
+    frozen: false,
 
 }
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
index 5184723..a35b54c 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/AdditionalInfo.aidl
@@ -54,23 +54,23 @@
   enum AdditionalInfoType {
     AINFO_BEGIN = 0,
     AINFO_END = 1,
-    AINFO_UNTRACKED_DELAY = 65536,
-    AINFO_INTERNAL_TEMPERATURE = 65537,
-    AINFO_VEC3_CALIBRATION = 65538,
-    AINFO_SENSOR_PLACEMENT = 65539,
-    AINFO_SAMPLING = 65540,
-    AINFO_CHANNEL_NOISE = 131072,
-    AINFO_CHANNEL_SAMPLER = 131073,
-    AINFO_CHANNEL_FILTER = 131074,
-    AINFO_CHANNEL_LINEAR_TRANSFORM = 131075,
-    AINFO_CHANNEL_NONLINEAR_MAP = 131076,
-    AINFO_CHANNEL_RESAMPLER = 131077,
-    AINFO_LOCAL_GEOMAGNETIC_FIELD = 196608,
-    AINFO_LOCAL_GRAVITY = 196609,
-    AINFO_DOCK_STATE = 196610,
-    AINFO_HIGH_PERFORMANCE_MODE = 196611,
-    AINFO_MAGNETIC_FIELD_CALIBRATION = 196612,
-    AINFO_CUSTOM_START = 268435456,
-    AINFO_DEBUGGING_START = 1073741824,
+    AINFO_UNTRACKED_DELAY = 0x10000,
+    AINFO_INTERNAL_TEMPERATURE,
+    AINFO_VEC3_CALIBRATION,
+    AINFO_SENSOR_PLACEMENT,
+    AINFO_SAMPLING,
+    AINFO_CHANNEL_NOISE = 0x20000,
+    AINFO_CHANNEL_SAMPLER,
+    AINFO_CHANNEL_FILTER,
+    AINFO_CHANNEL_LINEAR_TRANSFORM,
+    AINFO_CHANNEL_NONLINEAR_MAP,
+    AINFO_CHANNEL_RESAMPLER,
+    AINFO_LOCAL_GEOMAGNETIC_FIELD = 0x30000,
+    AINFO_LOCAL_GRAVITY,
+    AINFO_DOCK_STATE,
+    AINFO_HIGH_PERFORMANCE_MODE,
+    AINFO_MAGNETIC_FIELD_CALIBRATION,
+    AINFO_CUSTOM_START = 0x10000000,
+    AINFO_DEBUGGING_START = 0x40000000,
   }
 }
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
index b26040b..0566a64 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/ISensors.aidl
@@ -44,28 +44,28 @@
   int registerDirectChannel(in android.hardware.sensors.ISensors.SharedMemInfo mem);
   void setOperationMode(in android.hardware.sensors.ISensors.OperationMode mode);
   void unregisterDirectChannel(in int channelHandle);
-  const int ERROR_NO_MEMORY = -12;
-  const int ERROR_BAD_VALUE = -22;
+  const int ERROR_NO_MEMORY = (-12) /* -12 */;
+  const int ERROR_BAD_VALUE = (-22) /* -22 */;
   const int WAKE_LOCK_TIMEOUT_SECONDS = 1;
-  const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = 1;
-  const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = 2;
-  const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = 1;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 4;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 8;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 12;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 16;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 24;
-  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 88;
+  const int EVENT_QUEUE_FLAG_BITS_READ_AND_PROCESS = (1 << 0) /* 1 */;
+  const int EVENT_QUEUE_FLAG_BITS_EVENTS_READ = (1 << 1) /* 2 */;
+  const int WAKE_LOCK_QUEUE_FLAG_BITS_DATA_WRITTEN = (1 << 0) /* 1 */;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_FIELD = 0x0;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_REPORT_TOKEN = 0x4;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_SENSOR_TYPE = 0x8;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_ATOMIC_COUNTER = 0xC;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_TIMESTAMP = 0x10;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_DATA = 0x18;
+  const int DIRECT_REPORT_SENSOR_EVENT_OFFSET_SIZE_RESERVED = 0x58;
   const int DIRECT_REPORT_SENSOR_EVENT_TOTAL_LENGTH = 104;
-  const int RUNTIME_SENSORS_HANDLE_BASE = 1593835520;
-  const int RUNTIME_SENSORS_HANDLE_END = 1610612735;
+  const int RUNTIME_SENSORS_HANDLE_BASE = 0x5F000000;
+  const int RUNTIME_SENSORS_HANDLE_END = 0x5FFFFFFF;
   @Backing(type="int") @VintfStability
   enum RateLevel {
-    STOP = 0,
-    NORMAL = 1,
-    FAST = 2,
-    VERY_FAST = 3,
+    STOP,
+    NORMAL,
+    FAST,
+    VERY_FAST,
   }
   @Backing(type="int") @VintfStability
   enum OperationMode {
@@ -85,7 +85,7 @@
     @Backing(type="int") @VintfStability
     enum SharedMemType {
       ASHMEM = 1,
-      GRALLOC = 2,
+      GRALLOC,
     }
   }
 }
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
index 996be3d..677e6c4 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorInfo.aidl
@@ -54,14 +54,14 @@
   const int SENSOR_FLAG_BITS_ON_CHANGE_MODE = 2;
   const int SENSOR_FLAG_BITS_ONE_SHOT_MODE = 4;
   const int SENSOR_FLAG_BITS_SPECIAL_REPORTING_MODE = 6;
-  const int SENSOR_FLAG_BITS_DATA_INJECTION = 16;
-  const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 32;
-  const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 64;
-  const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 1024;
-  const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 2048;
-  const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 14;
-  const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 896;
-  const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 3072;
+  const int SENSOR_FLAG_BITS_DATA_INJECTION = 0x10;
+  const int SENSOR_FLAG_BITS_DYNAMIC_SENSOR = 0x20;
+  const int SENSOR_FLAG_BITS_ADDITIONAL_INFO = 0x40;
+  const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_ASHMEM = 0x400;
+  const int SENSOR_FLAG_BITS_DIRECT_CHANNEL_GRALLOC = 0x800;
+  const int SENSOR_FLAG_BITS_MASK_REPORTING_MODE = 0xE;
+  const int SENSOR_FLAG_BITS_MASK_DIRECT_REPORT = 0x380;
+  const int SENSOR_FLAG_BITS_MASK_DIRECT_CHANNEL = 0xC00;
   const int SENSOR_FLAG_SHIFT_REPORTING_MODE = 1;
   const int SENSOR_FLAG_SHIFT_DATA_INJECTION = 4;
   const int SENSOR_FLAG_SHIFT_DYNAMIC_SENSOR = 5;
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
index 4521710..f401dac 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorStatus.aidl
@@ -34,7 +34,7 @@
 package android.hardware.sensors;
 @Backing(type="byte") @VintfStability
 enum SensorStatus {
-  NO_CONTACT = -1,
+  NO_CONTACT = (-1) /* -1 */,
   UNRELIABLE = 0,
   ACCURACY_LOW = 1,
   ACCURACY_MEDIUM = 2,
diff --git a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
index 8c864e9..9332c63 100644
--- a/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
+++ b/sensors/aidl/aidl_api/android.hardware.sensors/current/android/hardware/sensors/SensorType.aidl
@@ -76,5 +76,6 @@
   ACCELEROMETER_LIMITED_AXES_UNCALIBRATED = 40,
   GYROSCOPE_LIMITED_AXES_UNCALIBRATED = 41,
   HEADING = 42,
-  DEVICE_PRIVATE_BASE = 65536,
+  MOISTURE_INTRUSION = 43,
+  DEVICE_PRIVATE_BASE = 0x10000,
 }
diff --git a/sensors/aidl/android/hardware/sensors/Event.aidl b/sensors/aidl/android/hardware/sensors/Event.aidl
index b95299c..7775cfc 100644
--- a/sensors/aidl/android/hardware/sensors/Event.aidl
+++ b/sensors/aidl/android/hardware/sensors/Event.aidl
@@ -88,7 +88,7 @@
          * SensorType::GLANCE_GESTURE, SensorType::PICK_UP_GESTURE,
          * SensorType::WRIST_TILT_GESTURE, SensorType::STATIONARY_DETECT,
          * SensorType::MOTION_DETECT, SensorType::HEART_BEAT,
-         * SensorType::LOW_LATENCY_OFFBODY_DETECT
+         * SensorType::LOW_LATENCY_OFFBODY_DETECT, SensorType::MOISTURE_INTRUSION
          */
         float scalar;
 
diff --git a/sensors/aidl/android/hardware/sensors/SensorType.aidl b/sensors/aidl/android/hardware/sensors/SensorType.aidl
index 4904c3f..adaf8e6 100644
--- a/sensors/aidl/android/hardware/sensors/SensorType.aidl
+++ b/sensors/aidl/android/hardware/sensors/SensorType.aidl
@@ -718,6 +718,20 @@
     HEADING = 42,
 
     /**
+     * MOISTURE_INTRUSION
+     * trigger mode: on-change
+     *
+     * Detects moisture intrusion in the chassis of device. This detection is
+     * one-way and persistent. Once a device is detected to have water damage,
+     * it will always report 1 (across factory reset /reboot) even if moisture
+     * is no longer present, until the device has been repaired.
+     * The only allowed values to return are:
+     *   0.0: no moisture intrusion detected in relevant history
+     *   1.0: moisture intrusion detected now or previously
+     */
+    MOISTURE_INTRUSION = 43,
+
+    /**
      * Base of the range reserved for device manufacturers' private sensor
      * types. These sensor types aren't documented in the SDK.
      */
diff --git a/sensors/aidl/convert/Android.bp b/sensors/aidl/convert/Android.bp
index 7217b2f..548308e 100644
--- a/sensors/aidl/convert/Android.bp
+++ b/sensors/aidl/convert/Android.bp
@@ -36,7 +36,7 @@
         "libhardware",
         "libbase",
         "libutils",
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
     ],
     whole_static_libs: [
         "sensors_common_convert",
diff --git a/sensors/aidl/default/Android.bp b/sensors/aidl/default/Android.bp
index 6f011ee..4bdcfb0 100644
--- a/sensors/aidl/default/Android.bp
+++ b/sensors/aidl/default/Android.bp
@@ -32,7 +32,7 @@
         "libfmq",
         "libpower",
         "libbinder_ndk",
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
     ],
     export_include_dirs: ["include"],
     srcs: [
@@ -58,7 +58,7 @@
     static_libs: [
         "android.hardware.common-V2-ndk",
         "android.hardware.common.fmq-V1-ndk",
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
         "android.system.suspend-V1-ndk",
         "libbase",
         "libcutils",
diff --git a/sensors/aidl/default/multihal/Android.bp b/sensors/aidl/default/multihal/Android.bp
index 7482ffe..6ca81d9 100644
--- a/sensors/aidl/default/multihal/Android.bp
+++ b/sensors/aidl/default/multihal/Android.bp
@@ -39,7 +39,7 @@
         "android.hardware.sensors@1.0",
         "android.hardware.sensors@2.0",
         "android.hardware.sensors@2.1",
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
     ],
     export_include_dirs: ["include"],
     srcs: [
diff --git a/sensors/aidl/default/sensors-default.xml b/sensors/aidl/default/sensors-default.xml
index 36b28ed..bed2538 100644
--- a/sensors/aidl/default/sensors-default.xml
+++ b/sensors/aidl/default/sensors-default.xml
@@ -1,7 +1,7 @@
 <manifest version="1.0" type="device">
     <hal format="aidl">
         <name>android.hardware.sensors</name>
-        <version>2</version>
+        <version>3</version>
         <fqname>ISensors/default</fqname>
     </hal>
 </manifest>
diff --git a/sensors/aidl/multihal/Android.bp b/sensors/aidl/multihal/Android.bp
index cac5fc2..cee3db6 100644
--- a/sensors/aidl/multihal/Android.bp
+++ b/sensors/aidl/multihal/Android.bp
@@ -41,7 +41,7 @@
         "android.hardware.sensors@2.0-ScopedWakelock",
         "android.hardware.sensors@2.0",
         "android.hardware.sensors@2.1",
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
         "libbase",
         "libcutils",
         "libfmq",
diff --git a/sensors/aidl/multihal/android.hardware.sensors-multihal.xml b/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
index 5da4fbd..9186f64 100644
--- a/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
+++ b/sensors/aidl/multihal/android.hardware.sensors-multihal.xml
@@ -17,7 +17,7 @@
 <manifest version="1.0" type="device">
     <hal format="aidl">
         <name>android.hardware.sensors</name>
-        <version>2</version>
+        <version>3</version>
         <fqname>ISensors/default</fqname>
     </hal>
 </manifest>
diff --git a/sensors/aidl/vts/Android.bp b/sensors/aidl/vts/Android.bp
index 1f96bb4..63371cd 100644
--- a/sensors/aidl/vts/Android.bp
+++ b/sensors/aidl/vts/Android.bp
@@ -42,7 +42,7 @@
         "android.hardware.common.fmq-V1-ndk",
     ],
     static_libs: [
-        "android.hardware.sensors-V2-ndk",
+        "android.hardware.sensors-V3-ndk",
         "VtsHalSensorsTargetTestUtils",
         "libaidlcommonsupport",
     ],
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
index 115ada7..b569baa 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -55,6 +55,6 @@
   void sendDefaultSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
   void getParamCaps(in android.hardware.tv.mediaquality.ParameterName[] paramNames, out android.hardware.tv.mediaquality.ParamCapability[] caps);
   void getVendorParamCaps(in android.hardware.tv.mediaquality.VendorParameterIdentifier[] names, out android.hardware.tv.mediaquality.VendorParamCapability[] caps);
-  void setPictureParametersCallback(android.hardware.tv.mediaquality.IPictureParametersCallback callback);
-  void setSoundParametersCallback(android.hardware.tv.mediaquality.ISoundParametersCallback callback);
+  void sendPictureParameters(in android.hardware.tv.mediaquality.PictureParameters pictureParameters);
+  void sendSoundParameters(in android.hardware.tv.mediaquality.SoundParameters soundParameters);
 }
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl
deleted file mode 100644
index ccb31c4..0000000
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2024 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.
- */
-///////////////////////////////////////////////////////////////////////////////
-// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE.                          //
-///////////////////////////////////////////////////////////////////////////////
-
-// This file is a snapshot of an AIDL file. Do not edit it manually. There are
-// two cases:
-// 1). this is a frozen version file - do not edit this in any case.
-// 2). this is a 'current' file. If you make a backwards compatible change to
-//     the interface (from the latest frozen version), the build system will
-//     prompt you to update this file with `m <name>-update-api`.
-//
-// You must not make a backward incompatible change to any AIDL file built
-// with the aidl_interface module type with versions property set. The module
-// type is used to build AIDL files in a way that they can be used across
-// independently updatable components of the system. If a device is shipped
-// with such a backward incompatible change, it has a high risk of breaking
-// later when a module using the interface is updated, e.g., Mainline modules.
-
-package android.hardware.tv.mediaquality;
-@VintfStability
-interface IPictureParametersCallback {
-  android.hardware.tv.mediaquality.PictureParameters getPictureParameters(long pictureProfileId);
-}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 6339377..e1a882e 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -37,4 +37,5 @@
   oneway void onPictureProfileAdjusted(in android.hardware.tv.mediaquality.PictureProfile pictureProfile);
   oneway void onParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
   oneway void onVendorParamCapabilityChanged(long pictureProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
+  oneway void onRequestPictureParameters(long pictureProfileId);
 }
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index 1006349..e162601 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -37,4 +37,5 @@
   oneway void onSoundProfileAdjusted(in android.hardware.tv.mediaquality.SoundProfile soundProfile);
   oneway void onParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.ParamCapability[] caps);
   oneway void onVendorParamCapabilityChanged(long soundProfileId, in android.hardware.tv.mediaquality.VendorParamCapability[] caps);
+  oneway void onRequestSoundParameters(long SoundProfileId);
 }
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
index e12ded0..373a977 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IMediaQuality.aidl
@@ -18,10 +18,8 @@
 
 import android.hardware.tv.mediaquality.AmbientBacklightSettings;
 import android.hardware.tv.mediaquality.IMediaQualityCallback;
-import android.hardware.tv.mediaquality.IPictureParametersCallback;
 import android.hardware.tv.mediaquality.IPictureProfileAdjustmentListener;
 import android.hardware.tv.mediaquality.IPictureProfileChangedListener;
-import android.hardware.tv.mediaquality.ISoundParametersCallback;
 import android.hardware.tv.mediaquality.ISoundProfileAdjustmentListener;
 import android.hardware.tv.mediaquality.ISoundProfileChangedListener;
 import android.hardware.tv.mediaquality.ParamCapability;
@@ -151,7 +149,14 @@
     /**
      * Sets the listener for picture adjustment from the HAL.
      *
-     * @param IPictureProfileAdjustmentListener listener object to pass picture profile.
+     * When the same client registers this listener multiple times, only the most recent
+     * registration will be active. The previous listener will be overwritten.
+     *
+     * When different client registers this listener, it will overwrite the previous registered
+     * client. Only one listener can be active.
+     *
+     * @param IPictureProfileAdjustmentListener listener object to pass picture profile, profile
+     *        id and hardware capability.
      */
     void setPictureProfileAdjustmentListener(IPictureProfileAdjustmentListener listener);
 
@@ -174,7 +179,14 @@
     /**
      * Sets the listener for sound adjustment from the HAL.
      *
-     * @param ISoundProfileAdjustmentListener listener object to pass sound profile.
+     * When the same client registers this listener multiple times, only the most recent
+     * registration will be active. The previous listener will be overwritten.
+     *
+     * When different client registers this listener, it will overwrite the previous registered
+     * client. Only one listener can be active.
+     *
+     * @param ISoundProfileAdjustmentListener listener object to pass sound profile, profile id
+     *        and hardware capability.
      */
     void setSoundProfileAdjustmentListener(ISoundProfileAdjustmentListener listener);
 
@@ -197,28 +209,18 @@
     void getVendorParamCaps(in VendorParameterIdentifier[] names, out VendorParamCapability[] caps);
 
     /**
-     * Sets picture parameters callback to get the picture parameters send by the client.
+     * When HAL request picture parameters by picture profile id, the framework will use this to
+     * send the picture parameters associate with the profile id.
      *
-     * When the same client registers this callback multiple times, only the most recent
-     * registration will be active. The previous callback will be overwritten.
-     *
-     * When different client registers this callback, it will overwrite the previous registered
-     * client. Only one callback can be active.
-     *
-     * @param callback Callback object to pass PictureParameters.
+     * @param pictureParameters pictureParameters that associate with the profile id HAL provided.
      */
-    void setPictureParametersCallback(IPictureParametersCallback callback);
+    void sendPictureParameters(in PictureParameters pictureParameters);
 
     /**
-     * Sets sound parameters callback to get the sound parameters send by the client.
+     * When HAL request sound parameters by sound profile id, the framework will use this to
+     * send the sound parameters associate with the profile id.
      *
-     * When the same client registers this callback multiple times, only the most recent
-     * registration will be active. The previous callback will be overwritten.
-     *
-     * When different client registers this callback, it will overwrite the previous registered
-     * client. Only one callback can be active.
-     *
-     * @param callback Callback object to pass SoundParameters.
+     * @param soundParameters soundParameters that associate with the profile id HAL provided.
      */
-    void setSoundParametersCallback(ISoundParametersCallback callback);
+    void sendSoundParameters(in SoundParameters soundParameters);
 }
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl
deleted file mode 100644
index b92c775..0000000
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureParametersCallback.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2024 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.
- */
-
-package android.hardware.tv.mediaquality;
-
-import android.hardware.tv.mediaquality.PictureParameters;
-
-@VintfStability
-interface IPictureParametersCallback {
-    /**
-     * Get the picture parameters by PictureProfile id. Check PictureParameters for its' detail.
-     * This is called from the HAL to media quality framework.
-     *
-     * @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
-     * @return PictureParameters with all the pre-defined parameters and vendor defined parameters.
-     */
-    PictureParameters getPictureParameters(long pictureProfileId);
-}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
index 806d90d..8a19544 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/IPictureProfileAdjustmentListener.aidl
@@ -46,4 +46,15 @@
      * @param caps the updated vendor capabilities.
      */
     void onVendorParamCapabilityChanged(long pictureProfileId, in VendorParamCapability[] caps);
+
+    /**
+     * Request the picture parameters by picture profile id. Check PictureParameters for its detail.
+     * This is called from the HAL to media quality framework.
+     *
+     * The requested picture parameters will get from IMediaQuality::sendPictureParameters called
+     * by the framework.
+     *
+     * @param pictureProfileId The PictureProfile id that associate with the PictureProfile.
+     */
+    void onRequestPictureParameters(long pictureProfileId);
 }
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
deleted file mode 100644
index 856ceb4..0000000
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * Copyright (C) 2024 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.
- */
-
-package android.hardware.tv.mediaquality;
-
-import android.hardware.tv.mediaquality.SoundParameters;
-
-@VintfStability
-interface ISoundParametersCallback {
-    /**
-     * Get the Sound parameters by SoundProfile id. Check SoundParameters for its' detail.
-     * This is called from the HAL to media quality framework.
-     *
-     * @param SoundProfileId The SoundProfile id that associate with the SoundProfile.
-     * @return SoundParameters with all the pre-defined parameters and vendor defined parameters.
-     */
-    SoundParameters getSoundParameters(long SoundProfileId);
-}
diff --git a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
index 5ee9d86..373cfc1 100644
--- a/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
+++ b/tv/mediaquality/aidl/android/hardware/tv/mediaquality/ISoundProfileAdjustmentListener.aidl
@@ -46,4 +46,15 @@
      * @param caps the updated vendor capabilities.
      */
     void onVendorParamCapabilityChanged(long soundProfileId, in VendorParamCapability[] caps);
+
+    /**
+     * Request the sound parameters by sound profile id. Check SoundParameters for its detail.
+     * This is called from the HAL to media quality framework.
+     *
+     * The requested sound parameters will get from IMediaQuality::sendSoundParameters called
+     * by the framework.
+     *
+     * @param SoundProfileId The SoundProfile id that associate with the SoundProfile.
+     */
+    void onRequestSoundParameters(long SoundProfileId);
 }
diff --git a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
index 190e6a7..1946cec 100644
--- a/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
+++ b/tv/mediaquality/aidl/default/hal/media_quality_hal_impl.rs
@@ -30,8 +30,6 @@
     SoundParameters::SoundParameters,
     VendorParamCapability::VendorParamCapability,
     VendorParameterIdentifier::VendorParameterIdentifier,
-    IPictureParametersCallback::IPictureParametersCallback,
-    ISoundParametersCallback::ISoundParametersCallback,
 };
 use binder::{Interface, Strong};
 use std::sync::{Arc, Mutex};
@@ -54,8 +52,6 @@
             Arc<Mutex<Option<Strong<dyn ISoundProfileAdjustmentListener>>>>,
     picture_profile_changed_listener: Arc<Mutex<Option<Strong<dyn IPictureProfileChangedListener>>>>,
     sound_profile_changed_listener: Arc<Mutex<Option<Strong<dyn ISoundProfileChangedListener>>>>,
-    picture_parameters_callback: Arc<Mutex<Option<Strong<dyn IPictureParametersCallback>>>>,
-    sound_parameters_callback: Arc<Mutex<Option<Strong<dyn ISoundParametersCallback>>>>,
 }
 
 impl MediaQualityService {
@@ -77,8 +73,6 @@
             sound_profile_adjustment_listener: Arc::new(Mutex::new(None)),
             picture_profile_changed_listener: Arc::new(Mutex::new(None)),
             sound_profile_changed_listener: Arc::new(Mutex::new(None)),
-            picture_parameters_callback: Arc::new(Mutex::new(None)),
-            sound_parameters_callback: Arc::new(Mutex::new(None)),
         }
     }
 }
@@ -272,21 +266,13 @@
         Ok(())
     }
 
-    fn setPictureParametersCallback(
-        &self,
-        callback: &Strong<dyn IPictureParametersCallback>
-    ) -> binder::Result<()> {
-        let mut cb = self.picture_parameters_callback.lock().unwrap();
-        *cb = Some(callback.clone());
+    fn sendPictureParameters(&self, _picture_parameters: &PictureParameters) -> binder::Result<()>{
+        println!("Received picture parameters");
         Ok(())
     }
 
-    fn setSoundParametersCallback(
-        &self,
-        callback: &Strong<dyn ISoundParametersCallback>
-    ) -> binder::Result<()> {
-        let mut cb = self.sound_parameters_callback.lock().unwrap();
-        *cb = Some(callback.clone());
+    fn sendSoundParameters(&self, _sound_parameters: &SoundParameters) -> binder::Result<()>{
+        println!("Received sound parameters");
         Ok(())
     }
 }
diff --git a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
index c3e25a4..09deee6 100644
--- a/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
+++ b/tv/mediaquality/aidl/vts/functional/VtsHalMediaQualityTest.cpp
@@ -94,6 +94,8 @@
         return ScopedAStatus::ok();
     }
 
+    ScopedAStatus onRequestPictureParameters(int64_t) { return ScopedAStatus::ok(); }
+
   private:
     std::function<void(const PictureProfile& pictureProfile)> on_hal_picture_profile_adjust_;
 };
@@ -118,6 +120,8 @@
         return ScopedAStatus::ok();
     }
 
+    ScopedAStatus onRequestSoundParameters(int64_t) { return ScopedAStatus::ok(); }
+
   private:
     std::function<void(const SoundProfile& soundProfile)> on_hal_sound_profile_adjust_;
 };
diff --git a/virtualization/capabilities_service/aidl/Android.bp b/virtualization/capabilities_service/aidl/Android.bp
new file mode 100644
index 0000000..b0bbbdd
--- /dev/null
+++ b/virtualization/capabilities_service/aidl/Android.bp
@@ -0,0 +1,35 @@
+// Copyright (C) 2024 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.
+
+package {
+    default_team: "trendy_team_virtualization",
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+aidl_interface {
+    name: "android.hardware.virtualization.capabilities.capabilities_service",
+    vendor_available: true,
+    srcs: ["android/**/*.aidl"],
+    stability: "vintf",
+    backend: {
+        rust: {
+            enabled: true,
+            apex_available: [
+                "//apex_available:platform",
+                "com.android.virt",
+            ],
+        },
+    },
+    frozen: false,
+}
diff --git a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl b/virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
similarity index 89%
rename from tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
rename to virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
index 9509006..68ff021 100644
--- a/tv/mediaquality/aidl/aidl_api/android.hardware.tv.mediaquality/current/android/hardware/tv/mediaquality/ISoundParametersCallback.aidl
+++ b/virtualization/capabilities_service/aidl/aidl_api/android.hardware.virtualization.capabilities.capabilities_service/current/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
@@ -31,8 +31,8 @@
 // with such a backward incompatible change, it has a high risk of breaking
 // later when a module using the interface is updated, e.g., Mainline modules.
 
-package android.hardware.tv.mediaquality;
+package android.hardware.virtualization.capabilities;
 @VintfStability
-interface ISoundParametersCallback {
-  android.hardware.tv.mediaquality.SoundParameters getSoundParameters(long SoundProfileId);
+interface IVmCapabilitiesService {
+  void grantAccessToVendorTeeServices(in ParcelFileDescriptor vmFd, in String[] vendorTeeServices);
 }
diff --git a/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl b/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
new file mode 100644
index 0000000..0d09ecb
--- /dev/null
+++ b/virtualization/capabilities_service/aidl/android/hardware/virtualization/capabilities/IVmCapabilitiesService.aidl
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2024 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.
+ */
+
+package android.hardware.virtualization.capabilities;
+
+/**
+ * Encapsulates vendor-specific capabilities that can be granted to VMs.
+ */
+@VintfStability
+interface IVmCapabilitiesService {
+    /**
+     * Grant access for the VM represented by the given vm_fd to the given vendor-owned tee
+     * services. The names in |vendorTeeServices| must match the ones defined in the
+     * tee_service_contexts files.
+     * TODO(ioffe): link to the integration doc for custom smc filtering feature once
+     * it's ready.
+     */
+    void grantAccessToVendorTeeServices(
+            in ParcelFileDescriptor vmFd, in String[] vendorTeeServices);
+}