Merge "Remove deprecated annotation." into main
diff --git a/audio/aidl/vts/EffectHelper.h b/audio/aidl/vts/EffectHelper.h
index eedac3d..8ceb56b 100644
--- a/audio/aidl/vts/EffectHelper.h
+++ b/audio/aidl/vts/EffectHelper.h
@@ -47,6 +47,7 @@
 using aidl::android::hardware::audio::effect::getRange;
 using aidl::android::hardware::audio::effect::IEffect;
 using aidl::android::hardware::audio::effect::isRangeValid;
+using aidl::android::hardware::audio::effect::kDrainSupportedVersion;
 using aidl::android::hardware::audio::effect::kEffectTypeUuidSpatializer;
 using aidl::android::hardware::audio::effect::kEventFlagDataMqNotEmpty;
 using aidl::android::hardware::audio::effect::kEventFlagDataMqUpdate;
@@ -195,8 +196,11 @@
                 ASSERT_TRUE(expectState(effect, State::PROCESSING));
                 break;
             case CommandId::STOP:
-                ASSERT_TRUE(expectState(effect, State::IDLE) ||
-                            expectState(effect, State::DRAINING));
+                // Enforce the state checking after kDrainSupportedVersion
+                if (getHalVersion(effect) >= kDrainSupportedVersion) {
+                    ASSERT_TRUE(expectState(effect, State::IDLE) ||
+                                expectState(effect, State::DRAINING));
+                }
                 break;
             case CommandId::RESET:
                 ASSERT_TRUE(expectState(effect, State::IDLE));
@@ -518,6 +522,11 @@
         }
     }
 
+    static int getHalVersion(const std::shared_ptr<IEffect>& effect) {
+        int version = 0;
+        return (effect && effect->getInterfaceVersion(&version).isOk()) ? version : 0;
+    }
+
     bool mIsSpatializer;
     Descriptor mDescriptor;
     size_t mInputFrameSize, mOutputFrameSize;
diff --git a/automotive/vehicle/aidl/impl/current/vhal/test/DefaultVehicleHalTest.cpp b/automotive/vehicle/aidl/impl/current/vhal/test/DefaultVehicleHalTest.cpp
index ab5f667..3b89e5f 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/test/DefaultVehicleHalTest.cpp
+++ b/automotive/vehicle/aidl/impl/current/vhal/test/DefaultVehicleHalTest.cpp
@@ -1874,8 +1874,8 @@
 
     auto maybeResults = getCallback()->nextOnPropertyEventResults();
     size_t retryCount = 0;
-    // Add a 1s (100ms * 10) buffer time.
-    while (!maybeResults.has_value() && retryCount < 10) {
+    // Add a 10s (100ms * 100) buffer time.
+    while (!maybeResults.has_value() && retryCount < 100) {
         retryCount++;
         std::this_thread::sleep_for(std::chrono::milliseconds(100));
     }
diff --git a/biometrics/face/aidl/default/apex/Android.bp b/biometrics/face/aidl/default/apex/Android.bp
index c4632d4..0561145 100644
--- a/biometrics/face/aidl/default/apex/Android.bp
+++ b/biometrics/face/aidl/default/apex/Android.bp
@@ -19,7 +19,7 @@
 apex {
     name: "com.android.hardware.biometrics.face.virtual",
     manifest: "manifest.json",
-    file_contexts: "file_contexts",
+    file_contexts: ":com.android.biometrics.virtual.face-file_contexts",
     key: "com.android.hardware.key",
     certificate: ":com.android.hardware.certificate",
     updatable: false,
diff --git a/biometrics/face/aidl/default/apex/file_contexts b/biometrics/face/aidl/default/apex/file_contexts
deleted file mode 100644
index 4f935c1..0000000
--- a/biometrics/face/aidl/default/apex/file_contexts
+++ /dev/null
@@ -1,3 +0,0 @@
-(/.*)?                                          u:object_r:vendor_file:s0
-/etc(/.*)?                                      u:object_r:vendor_configs_file:s0
-/bin/hw/android\.hardware\.biometrics\.face-service\.example u:object_r:hal_face_default_exec:s0
\ No newline at end of file
diff --git a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
index ad7473b..be76497 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.network/current/android/hardware/radio/network/IRadioNetwork.aidl
@@ -104,7 +104,7 @@
   oneway void setCellularIdentifierTransparencyEnabled(in int serial, in boolean enabled);
   oneway void setSecurityAlgorithmsUpdatedEnabled(in int serial, boolean enable);
   oneway void isSecurityAlgorithmsUpdatedEnabled(in int serial);
-  oneway void setSatellitePlmn(in int serial, in int simSlot, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);
-  oneway void setSatelliteEnabledForCarrier(in int serial, in int simSlot, boolean satelliteEnabled);
-  oneway void isSatelliteEnabledForCarrier(in int serial, in int simSlot);
+  oneway void setSatellitePlmn(in int serial, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);
+  oneway void setSatelliteEnabledForCarrier(in int serial, boolean satelliteEnabled);
+  oneway void isSatelliteEnabledForCarrier(in int serial);
 }
diff --git a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
index 2509b6d..dce9865 100644
--- a/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
+++ b/radio/aidl/android/hardware/radio/network/IRadioNetwork.aidl
@@ -734,8 +734,6 @@
      * satellite LTE service.
      *
      * @param serial Serial number of request
-     * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
-     *                this information to determine the relevant carrier.
      * @param carrierPlmnArray Array of roaming PLMN used for connecting to satellite networks
      *                         supported by user subscription.
      * @param allSatellitePlmnArray allSatellitePlmnArray contains all the PLMNs present in
@@ -749,8 +747,8 @@
      *
      * This is available when android.hardware.telephony.radio.access is defined.
      */
-    void setSatellitePlmn(in int serial, in int simSlot, in String[] carrierPlmnArray,
-            in String[] allSatellitePlmnArray);
+    void setSatellitePlmn(
+            in int serial, in String[] carrierPlmnArray, in String[] allSatellitePlmnArray);
 
     /**
      * Enable or disable satellite in the cellular modem associated with a carrier.
@@ -760,25 +758,22 @@
      * If modem is enabled, modem should attach to only PLMNs present in carrierPlmnArray.
      *
      * @param serial Serial number of request
-     * @param simSlot Indicates the SIM slot to which this API will be applied. The modem will use
-     *                this information to determine the relevant carrier.
      * @param satelliteEnabled {@code true} to enable satellite, {@code false} to disable satellite.
      *
      * Response function is IRadioNetworkResponse.setSatelliteEnabledForCarrier()
      *
      * This is available when android.hardware.telephony.radio.access is defined.
      */
-    void setSatelliteEnabledForCarrier(in int serial, in int simSlot, boolean satelliteEnabled);
+    void setSatelliteEnabledForCarrier(in int serial, boolean satelliteEnabled);
 
     /**
      * Check whether satellite is enabled in the cellular modem associated with a carrier.
      *
      * @param serial Serial number of request
-     * @param simSlot Indicates the SIM slot to which this API will be applied.
      *
      * Response function is IRadioNetworkResponse.isSatelliteEnabledForCarrier()
      *
      * This is available when android.hardware.telephony.radio.access is defined.
      */
-    void isSatelliteEnabledForCarrier(in int serial, in int simSlot);
+    void isSatelliteEnabledForCarrier(in int serial);
 }
diff --git a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
index c9a3270..ae76808 100644
--- a/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
+++ b/radio/aidl/compat/libradiocompat/include/libradiocompat/RadioNetwork.h
@@ -115,11 +115,11 @@
     ::ndk::ScopedAStatus isSecurityAlgorithmsUpdatedEnabled(int32_t serial) override;
 
     ::ndk::ScopedAStatus setSatellitePlmn(
-            int32_t serial, int32_t simSlot, const std::vector<std::string>& carrierPlmnArray,
+            int32_t serial, const std::vector<std::string>& carrierPlmnArray,
             const std::vector<std::string>& allSatellitePlmnArray) override;
-    ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot,
+    ::ndk::ScopedAStatus setSatelliteEnabledForCarrier(int32_t serial,
                                                        bool satelliteEnabled) override;
-    ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial, int32_t simSlot) override;
+    ::ndk::ScopedAStatus isSatelliteEnabledForCarrier(int32_t serial) override;
 
   protected:
     std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();
diff --git a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
index b5aee5c..2359034 100644
--- a/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
+++ b/radio/aidl/compat/libradiocompat/network/RadioNetwork.cpp
@@ -403,7 +403,7 @@
 }
 
 ScopedAStatus RadioNetwork::setSatellitePlmn(
-        int32_t serial, int32_t /*simSlot*/, const std::vector<std::string>& /*carrierPlmnArray*/,
+        int32_t serial, const std::vector<std::string>& /*carrierPlmnArray*/,
         const std::vector<std::string>& /*allSatellitePlmnArray*/) {
     LOG_CALL << serial;
     LOG(ERROR) << " setSatellitePlmn is unsupported by HIDL HALs";
@@ -411,15 +411,14 @@
     return ok();
 }
 
-ScopedAStatus RadioNetwork::setSatelliteEnabledForCarrier(int32_t serial, int32_t /*simSlot*/,
-                                                          bool /*enable*/) {
+ScopedAStatus RadioNetwork::setSatelliteEnabledForCarrier(int32_t serial, bool /*enable*/) {
     LOG_CALL << serial;
     LOG(ERROR) << " setSatelliteEnabledForCarrier is unsupported by HIDL HALs";
     respond()->setSatelliteEnabledForCarrierResponse(notSupported(serial));
     return ok();
 }
 
-ScopedAStatus RadioNetwork::isSatelliteEnabledForCarrier(int32_t serial, int32_t /*simSlot*/) {
+ScopedAStatus RadioNetwork::isSatelliteEnabledForCarrier(int32_t serial) {
     LOG_CALL << serial;
     LOG(ERROR) << " isSatelliteEnabledForCarrier is unsupported by HIDL HALs";
     respond()->isSatelliteEnabledForCarrierResponse(notSupported(serial), false);
diff --git a/radio/aidl/vts/radio_network_test.cpp b/radio/aidl/vts/radio_network_test.cpp
index 1778c3f..6b0b33a 100644
--- a/radio/aidl/vts/radio_network_test.cpp
+++ b/radio/aidl/vts/radio_network_test.cpp
@@ -2629,7 +2629,7 @@
     }
 
     serial = GetRandomSerialNumber();
-    radio_network->setSatellitePlmn(serial, 0, {"123456"}, {"123456, 3456789"});
+    radio_network->setSatellitePlmn(serial, {"123456"}, {"123456, 3456789"});
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
     EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
@@ -2654,7 +2654,7 @@
 
     // Get current value
     serial = GetRandomSerialNumber();
-    radio_network->isSatelliteEnabledForCarrier(serial, 0);
+    radio_network->isSatelliteEnabledForCarrier(serial);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     bool originalSatelliteEnabledSetting = radioRsp_network->isSatelliteEnabledForCarrier;
 
@@ -2663,7 +2663,7 @@
     // for the right default value.
     bool valueToSet = !originalSatelliteEnabledSetting;
     serial = GetRandomSerialNumber();
-    radio_network->setSatelliteEnabledForCarrier(serial, 0, valueToSet);
+    radio_network->setSatelliteEnabledForCarrier(serial, valueToSet);
     EXPECT_EQ(std::cv_status::no_timeout, wait());
     EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
     EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
@@ -2675,7 +2675,7 @@
     if (radioRsp_network->rspInfo.error == RadioError::NONE) {
         // Assert the value has changed
         serial = GetRandomSerialNumber();
-        ndk::ScopedAStatus res = radio_network->isSatelliteEnabledForCarrier(serial, 0);
+        ndk::ScopedAStatus res = radio_network->isSatelliteEnabledForCarrier(serial);
 
         ASSERT_OK(res);
         EXPECT_EQ(std::cv_status::no_timeout, wait());
@@ -2687,7 +2687,7 @@
         EXPECT_EQ(valueToSet, radioRsp_network->isSatelliteEnabledForCarrier);
 
         // Reset original state
-        radio_network->setSatelliteEnabledForCarrier(serial, 0, originalSatelliteEnabledSetting);
+        radio_network->setSatelliteEnabledForCarrier(serial, originalSatelliteEnabledSetting);
         EXPECT_EQ(std::cv_status::no_timeout, wait());
         EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_network->rspInfo.type);
         EXPECT_EQ(serial, radioRsp_network->rspInfo.serial);
diff --git a/security/keymint/aidl/default/hal/lib.rs b/security/keymint/aidl/default/hal/lib.rs
index 359890d..fad807f 100644
--- a/security/keymint/aidl/default/hal/lib.rs
+++ b/security/keymint/aidl/default/hal/lib.rs
@@ -20,39 +20,22 @@
 use kmr_hal::env::get_property;
 use log::error;
 
-/// Retrieve the most significant attestation property for `name`.
-fn attestation_property(name: &str) -> Vec<u8> {
-    let prop_val =
-        get_property(&format!("ro.product.{}_for_attestation", name)).unwrap_or_default();
-    if !prop_val.is_empty() {
-        prop_val
-    } else {
-        let prop_val = get_property(&format!("ro.product.vendor.{}", name)).unwrap_or_default();
-        if !prop_val.is_empty() {
-            prop_val
-        } else {
-            get_property(&format!("ro.product.{}", name))
-                .unwrap_or_else(|prop_name| format!("{} unavailable", prop_name))
-        }
-    }
-    .as_bytes()
-    .to_vec()
-}
-
 /// Populate attestation ID information based on properties (where available).
 /// Retrieving the serial number requires SELinux permission.
 pub fn attestation_id_info() -> kmr_wire::AttestationIdInfo {
-
-    kmr_wire::AttestationIdInfo {
-        brand: attestation_property("brand"),
-        device: attestation_property("device"),
-        product: attestation_property("name"),
-        serial: get_property("ro.serialno")
-            .unwrap_or_else(|_| format!("ro.serialno unavailable"))
+    let prop = |name| {
+        get_property(name)
+            .unwrap_or_else(|_| format!("{} unavailable", name))
             .as_bytes()
-            .to_vec(),
-        manufacturer: attestation_property("manufacturer"),
-        model: attestation_property("model"),
+            .to_vec()
+    };
+    kmr_wire::AttestationIdInfo {
+        brand: prop("ro.product.brand"),
+        device: prop("ro.product.device"),
+        product: prop("ro.product.name"),
+        serial: prop("ro.serialno"),
+        manufacturer: prop("ro.product.manufacturer"),
+        model: prop("ro.product.model"),
         // Currently modem_simulator always returns one fixed value. See `handleGetIMEI` in
         // device/google/cuttlefish/host/commands/modem_simulator/misc_service.cpp for more details.
         // TODO(b/263188546): Use device-specific IMEI values when available.
diff --git a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
index 158e4f1..59d9593 100644
--- a/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
+++ b/tv/tuner/aidl/vts/functional/VtsHalTvTunerTargetTest.cpp
@@ -214,9 +214,7 @@
     ASSERT_TRUE(mFilterTests.startFilter(filterId));
     // tune test
     ASSERT_TRUE(mFrontendTests.tuneFrontend(frontendConf, true /*testWithDemux*/));
-    if (!isPassthroughFilter(filterConf)) {
-        ASSERT_TRUE(filterDataOutputTest());
-    }
+    ASSERT_TRUE(filterDataOutputTest());
     ASSERT_TRUE(mFrontendTests.stopTuneFrontend(true /*testWithDemux*/));
     ASSERT_TRUE(mFilterTests.stopFilter(filterId));
     ASSERT_TRUE(mFilterTests.releaseShareAvHandle(filterId));
@@ -1383,6 +1381,10 @@
     auto live_configs = generateLiveConfigurations();
     for (auto& configuration : live_configs) {
         live = configuration;
+        // shared memory handle is not used by a passthrough filter at all
+        if (isPassthroughFilter(filterMap[live.videoFilterId])) {
+            continue;
+        }
         mediaFilterUsingSharedMemoryTest(filterMap[live.videoFilterId],
                                          frontendMap[live.frontendId]);
     }
diff --git a/virtualization/OWNERS b/virtualization/OWNERS
new file mode 100644
index 0000000..316145b
--- /dev/null
+++ b/virtualization/OWNERS
@@ -0,0 +1 @@
+include platform/packages/modules/Virtualization:/OWNERS
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
index 778e20a..3522014 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_iface_aidl_test.cpp
@@ -986,15 +986,16 @@
  * Test the P2P network management functions.
  */
 TEST_P(SupplicantP2pIfaceAidlTest, ManageNetworks) {
-    std::shared_ptr<ISupplicantP2pNetwork> network;
-    EXPECT_TRUE(p2p_iface_->addNetwork(&network).isOk());
-    ASSERT_NE(network, nullptr);
+    // Create a persistent group to bring up a network
+    EXPECT_TRUE(p2p_iface_->addGroup(true /* persistent */, -1).isOk());
+    sleep(2);
 
     std::vector<int32_t> networkList;
     EXPECT_TRUE(p2p_iface_->listNetworks(&networkList).isOk());
     ASSERT_FALSE(networkList.empty());
 
     int networkId = networkList[0];
+    std::shared_ptr<ISupplicantP2pNetwork> network;
     EXPECT_TRUE(p2p_iface_->getNetwork(networkId, &network).isOk());
     ASSERT_NE(network, nullptr);
     EXPECT_TRUE(p2p_iface_->removeNetwork(networkId).isOk());
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_network_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_network_aidl_test.cpp
index c5a73f1..165a01a 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_p2p_network_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_p2p_network_aidl_test.cpp
@@ -48,11 +48,22 @@
 
         EXPECT_TRUE(supplicant_->getP2pInterface(getP2pIfaceName(), &p2p_iface_).isOk());
         ASSERT_NE(p2p_iface_, nullptr);
-        EXPECT_TRUE(p2p_iface_->addNetwork(&p2p_network_).isOk());
+
+        // Create a persistent group to bring up a network
+        EXPECT_TRUE(p2p_iface_->addGroup(true /* persistent */, -1).isOk());
+        sleep(2);
+
+        std::vector<int32_t> networkList;
+        EXPECT_TRUE(p2p_iface_->listNetworks(&networkList).isOk());
+        ASSERT_FALSE(networkList.empty());
+
+        network_id_ = networkList[0];
+        EXPECT_TRUE(p2p_iface_->getNetwork(network_id_, &p2p_network_).isOk());
         ASSERT_NE(p2p_network_, nullptr);
     }
 
     void TearDown() override {
+        EXPECT_TRUE(p2p_iface_->removeNetwork(network_id_).isOk());
         stopSupplicantService();
         startWifiFramework();
     }
@@ -61,6 +72,7 @@
     std::shared_ptr<ISupplicant> supplicant_;
     std::shared_ptr<ISupplicantP2pIface> p2p_iface_;
     std::shared_ptr<ISupplicantP2pNetwork> p2p_network_;
+    int network_id_;
 };
 
 /*
@@ -130,7 +142,8 @@
 TEST_P(SupplicantP2pNetworkAidlTest, IsGroupOwner) {
     bool isGroupOwner;
     EXPECT_TRUE(p2p_network_->isGroupOwner(&isGroupOwner).isOk());
-    EXPECT_FALSE(isGroupOwner);
+    // Configured network is a group owner
+    EXPECT_TRUE(isGroupOwner);
 }
 
 /*
@@ -139,7 +152,8 @@
 TEST_P(SupplicantP2pNetworkAidlTest, IsPersistent) {
     bool isPersistent;
     EXPECT_TRUE(p2p_network_->isPersistent(&isPersistent).isOk());
-    EXPECT_FALSE(isPersistent);
+    // Configured network is persistent
+    EXPECT_TRUE(isPersistent);
 }
 
 /*
diff --git a/wifi/supplicant/aidl/vts/functional/supplicant_sta_network_aidl_test.cpp b/wifi/supplicant/aidl/vts/functional/supplicant_sta_network_aidl_test.cpp
index 5e6069f..2f0053a 100644
--- a/wifi/supplicant/aidl/vts/functional/supplicant_sta_network_aidl_test.cpp
+++ b/wifi/supplicant/aidl/vts/functional/supplicant_sta_network_aidl_test.cpp
@@ -862,6 +862,20 @@
     EXPECT_TRUE(sta_network_->setVendorData(kTestVendorData).isOk());
 }
 
+/*
+ * Set/Get EDMG
+ */
+TEST_P(SupplicantStaNetworkAidlTest, SetGetEdmg) {
+    bool retrievedValue = false;
+    EXPECT_TRUE(sta_network_->setEdmg(true).isOk());
+    EXPECT_TRUE(sta_network_->getEdmg(&retrievedValue).isOk());
+    EXPECT_EQ(retrievedValue, true);
+
+    EXPECT_TRUE(sta_network_->setEdmg(false).isOk());
+    EXPECT_TRUE(sta_network_->getEdmg(&retrievedValue).isOk());
+    EXPECT_EQ(retrievedValue, false);
+}
+
 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(SupplicantStaNetworkAidlTest);
 INSTANTIATE_TEST_SUITE_P(Supplicant, SupplicantStaNetworkAidlTest,
                          testing::ValuesIn(android::getAidlHalInstanceNames(