Merge "Extend VTS to support multiple display if available." into main
diff --git a/audio/aidl/default/CapEngineConfigXmlConverter.cpp b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
index 20fbca4..14d27f2 100644
--- a/audio/aidl/default/CapEngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/CapEngineConfigXmlConverter.cpp
@@ -52,6 +52,7 @@
 static constexpr const char* gOutputDevicesParameter = "selected_output_devices";
 static constexpr const char* gOutputDeviceAddressParameter = "device_address";
 static constexpr const char* gStrategyPrefix = "vx_";
+static constexpr const char* gLegacyStrategyPrefix = "STRATEGY_";
 static constexpr const char* gLegacyOutputDevicePrefix = "AUDIO_DEVICE_OUT_";
 static constexpr const char* gLegacyInputDevicePrefix = "AUDIO_DEVICE_IN_";
 static constexpr const char* gLegacyStreamPrefix = "AUDIO_STREAM_";
@@ -159,6 +160,17 @@
             }
             return strategyId;
         }
+        pos = stringToken.find(gLegacyStrategyPrefix);
+        if (pos != std::string::npos) {
+            std::string legacyStrategyIdLiteral = stringToken.substr(pos);
+            const auto legacyStrategies = getLegacyProductStrategyMap();
+            if (const auto& it = legacyStrategies.find(legacyStrategyIdLiteral);
+                    it != legacyStrategies.end()) {
+                return it->second;
+            }
+            LOG(ERROR) << "Invalid legacy strategy " << stringToken << " from path " << path;
+            return unexpected(BAD_VALUE);
+        }
     }
     return unexpected(BAD_VALUE);
 }
diff --git a/audio/aidl/default/EngineConfigXmlConverter.cpp b/audio/aidl/default/EngineConfigXmlConverter.cpp
index d945b17..78deb64 100644
--- a/audio/aidl/default/EngineConfigXmlConverter.cpp
+++ b/audio/aidl/default/EngineConfigXmlConverter.cpp
@@ -59,20 +59,6 @@
 static constexpr char kCapEngineConfigFileName[] =
         "/parameter-framework/Settings/Policy/PolicyConfigurableDomains.xml";
 
-void EngineConfigXmlConverter::initProductStrategyMap() {
-#define STRATEGY_ENTRY(name) {"STRATEGY_" #name, static_cast<int>(AudioProductStrategyType::name)}
-
-    mProductStrategyMap = {STRATEGY_ENTRY(MEDIA),
-                           STRATEGY_ENTRY(PHONE),
-                           STRATEGY_ENTRY(SONIFICATION),
-                           STRATEGY_ENTRY(SONIFICATION_RESPECTFUL),
-                           STRATEGY_ENTRY(DTMF),
-                           STRATEGY_ENTRY(ENFORCED_AUDIBLE),
-                           STRATEGY_ENTRY(TRANSMITTED_THROUGH_SPEAKER),
-                           STRATEGY_ENTRY(ACCESSIBILITY)};
-#undef STRATEGY_ENTRY
-}
-
 ConversionResult<int> EngineConfigXmlConverter::convertProductStrategyNameToAidl(
         const std::string& xsdcProductStrategyName) {
     const auto [it, success] = mProductStrategyMap.insert(
@@ -242,7 +228,7 @@
 }
 
 void EngineConfigXmlConverter::init() {
-    initProductStrategyMap();
+    mProductStrategyMap = getLegacyProductStrategyMap();
     if (getXsdcConfig()->hasProductStrategies()) {
         mAidlEngineConfig.productStrategies = VALUE_OR_FATAL(
                 (convertWrappedCollectionToAidl<eng_xsd::ProductStrategies,
diff --git a/audio/aidl/default/XsdcConversion.cpp b/audio/aidl/default/XsdcConversion.cpp
index b42d7f5..5845903 100644
--- a/audio/aidl/default/XsdcConversion.cpp
+++ b/audio/aidl/default/XsdcConversion.cpp
@@ -816,4 +816,23 @@
     }
     return aidlCurvePoint;
 }
+
+/**
+ * The hard coded id must be in sync with policy.h definition of legacy strategy ids.
+ */
+std::unordered_map<std::string, int> getLegacyProductStrategyMap() {
+#define STRATEGY_ENTRY(name, id) {"STRATEGY_" #name, static_cast<int>(id)}
+
+        return {STRATEGY_ENTRY(MEDIA, 5),
+                STRATEGY_ENTRY(PHONE, 0),
+                STRATEGY_ENTRY(SONIFICATION, 1),
+                STRATEGY_ENTRY(SONIFICATION_RESPECTFUL, 4),
+                STRATEGY_ENTRY(DTMF, 6),
+                STRATEGY_ENTRY(ENFORCED_AUDIBLE, 2),
+                STRATEGY_ENTRY(CALL_ASSISTANT, 7),
+                STRATEGY_ENTRY(TRANSMITTED_THROUGH_SPEAKER,8),
+                STRATEGY_ENTRY(ACCESSIBILITY, 3)};
+#undef STRATEGY_ENTRY
+}
+
 }  // namespace aidl::android::hardware::audio::core::internal
diff --git a/audio/aidl/default/include/core-impl/XsdcConversion.h b/audio/aidl/default/include/core-impl/XsdcConversion.h
index f00206b..b298eee 100644
--- a/audio/aidl/default/include/core-impl/XsdcConversion.h
+++ b/audio/aidl/default/include/core-impl/XsdcConversion.h
@@ -64,4 +64,5 @@
         const engineconfiguration::Stream& xsdStreamType);
 ConversionResult<int32_t> convertAudioFlagsToAidl(
         const std::vector<engineconfiguration::FlagType>& xsdcFlagTypeVec);
+std::unordered_map<std::string, int> getLegacyProductStrategyMap();
 }  // namespace aidl::android::hardware::audio::core::internal
diff --git a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
index 1e6f186..70790c4 100644
--- a/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
+++ b/audio/aidl/vts/VtsHalDynamicsProcessingTest.cpp
@@ -1254,6 +1254,7 @@
         SKIP_TEST_IF_DATA_UNSUPPORTED(mDescriptor.common.flags);
         ASSERT_NO_FATAL_FAILURE(generateSineWave(mTestFrequencies, mInput, 1.0, kSamplingFrequency,
                                                  mChannelLayout));
+        mInputDb = calculateDb(mInput);
     }
 
     void TearDown() override { TearDownDynamicsProcessingEffect(); }
@@ -1276,11 +1277,11 @@
 
     void fillMbcBandConfig(std::vector<DynamicsProcessing::MbcBandConfig>& cfgs, int channelIndex,
                            float threshold, float ratio, float noiseGate, float expanderRatio,
-                           int bandIndex, int cutoffFreqHz) {
-        cfgs.push_back(createMbcBandConfig(
-                channelIndex, bandIndex, static_cast<float>(cutoffFreqHz), kDefaultAttackTime,
-                kDefaultReleaseTime, ratio, threshold, kDefaultKneeWidth, noiseGate, expanderRatio,
-                kDefaultPreGainDb, kDefaultPostGainDb));
+                           int bandIndex, int cutoffFreqHz, float preGain, float postGain) {
+        cfgs.push_back(createMbcBandConfig(channelIndex, bandIndex,
+                                           static_cast<float>(cutoffFreqHz), kDefaultAttackTime,
+                                           kDefaultReleaseTime, ratio, threshold, kDefaultKneeWidth,
+                                           noiseGate, expanderRatio, preGain, postGain));
     }
 
     void getMagnitudeValue(const std::vector<float>& output, std::vector<float>& bufferMag) {
@@ -1291,10 +1292,9 @@
 
     void validateOutput(const std::vector<float>& output, float threshold, float ratio,
                         size_t bandIndex) {
-        float inputDb = calculateDb(mInput);
         std::vector<float> outputMag(mBinOffsets.size());
         EXPECT_NO_FATAL_FAILURE(getMagnitudeValue(output, outputMag));
-        if (threshold >= inputDb || ratio == 1) {
+        if (threshold >= mInputDb || ratio == 1) {
             std::vector<float> inputMag(mBinOffsets.size());
             EXPECT_NO_FATAL_FAILURE(getMagnitudeValue(mInput, inputMag));
             for (size_t i = 0; i < inputMag.size(); i++) {
@@ -1315,10 +1315,11 @@
         for (size_t i = 0; i < cutoffFreqHz.size(); i++) {
             for (int channelIndex = 0; channelIndex < mChannelCount; channelIndex++) {
                 fillMbcBandConfig(mCfgs, channelIndex, threshold, ratio, kDefaultNoiseGateDb,
-                                  kDefaultExpanderRatio, i, cutoffFreqHz[i]);
+                                  kDefaultExpanderRatio, i, cutoffFreqHz[i], kDefaultPreGainDb,
+                                  kDefaultPostGainDb);
                 fillMbcBandConfig(mCfgs, channelIndex, kDefaultThresholdDb, kDefaultRatio,
                                   kDefaultNoiseGateDb, kDefaultExpanderRatio, i ^ 1,
-                                  cutoffFreqHz[i ^ 1]);
+                                  cutoffFreqHz[i ^ 1], kDefaultPreGainDb, kDefaultPostGainDb);
             }
             ASSERT_NO_FATAL_FAILURE(setMbcParamsAndProcess(output));
 
@@ -1347,6 +1348,8 @@
     static constexpr float kDefaultExpanderRatio = 1;
     static constexpr float kDefaultRatio = 1;
     static constexpr float kBinWidth = (float)kSamplingFrequency / kNPointFFT;
+    // Full scale sine wave with 100 Hz and 1000 Hz frequency is -6 dB
+    static constexpr float kFullScaleDb = -6;
     std::vector<int> mTestFrequencies = {100, 1000};
     // Calculating normalizing factor by dividing the number of FFT points by half and the number of
     // test frequencies. The normalization accounts for the FFT splitting the signal into positive
@@ -1357,6 +1360,7 @@
     std::vector<DynamicsProcessing::ChannelConfig> mChannelConfig;
     std::vector<int> mBinOffsets;
     std::vector<float> mInput;
+    float mInputDb;
 };
 
 TEST_P(DynamicsProcessingMbcBandConfigDataTest, IncreasingThreshold) {
@@ -1379,6 +1383,31 @@
     }
 }
 
+TEST_P(DynamicsProcessingMbcBandConfigDataTest, IncreasingPostGain) {
+    std::vector<float> postGainDbValues = {-55, -30, 0, 30, 55};
+    std::vector<float> output(mInput.size());
+    for (float postGainDb : postGainDbValues) {
+        float amplitude = 1.0 / (pow(10, postGainDb / 20));
+        ASSERT_NO_FATAL_FAILURE(generateSineWave(mTestFrequencies, mInput, amplitude,
+                                                 kSamplingFrequency, mChannelLayout));
+        mInputDb = calculateDb(mInput);
+        EXPECT_NEAR(mInputDb, kFullScaleDb - postGainDb, kToleranceDb);
+        cleanUpMbcConfig();
+        for (int i = 0; i < mChannelCount; i++) {
+            fillMbcBandConfig(mCfgs, i, kDefaultThresholdDb, kDefaultRatio, kDefaultNoiseGateDb,
+                              kDefaultExpanderRatio, 0 /*band index*/, 2000 /*cutoffFrequency*/,
+                              kDefaultPreGainDb, postGainDb);
+        }
+        EXPECT_NO_FATAL_FAILURE(setMbcParamsAndProcess(output));
+        if (!isAllParamsValid()) {
+            continue;
+        }
+        float outputDb = calculateDb(output, kStartIndex);
+        EXPECT_NEAR(outputDb, mInputDb + postGainDb, kToleranceDb)
+                << "PostGain: " << postGainDb << ", OutputDb: " << outputDb;
+    }
+}
+
 INSTANTIATE_TEST_SUITE_P(DynamicsProcessingTest, DynamicsProcessingMbcBandConfigDataTest,
                          testing::ValuesIn(EffectFactoryHelper::getAllEffectDescriptors(
                                  IFactory::descriptor, getEffectTypeUuidDynamicsProcessing())),
diff --git a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
index ff84f9d..d093ffe 100644
--- a/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
+++ b/audio/effect/all-versions/vts/functional/VtsHalAudioEffectTargetTest.cpp
@@ -39,6 +39,7 @@
 #include <gtest/gtest.h>
 #include <hidl/GtestPrinter.h>
 #include <hidl/ServiceManagement.h>
+#include <hwbinder/IPCThreadState.h>
 
 using ::android::sp;
 using ::android::hardware::hidl_handle;
@@ -205,6 +206,11 @@
     void TearDown() override {
         effect.clear();
         effectsFactory.clear();
+        // Ensure all pending binder transactions are completed before proceeding.
+        android::hardware::IPCThreadState::self()->flushCommands();
+        // Add a delay to allow the binder destruction to propagate and ensure
+        // the remote objects are properly cleaned up.
+        usleep(100 * 1000);
     }
 
    protected:
diff --git a/automotive/can/1.0/default/libnetdevice/can.cpp b/automotive/can/1.0/default/libnetdevice/can.cpp
index 9cf0253..32d899b 100644
--- a/automotive/can/1.0/default/libnetdevice/can.cpp
+++ b/automotive/can/1.0/default/libnetdevice/can.cpp
@@ -80,7 +80,7 @@
 
     {
         auto linkinfo = req.addNested(IFLA_LINKINFO);
-        req.addBuffer(IFLA_INFO_KIND, "can");
+        req.add(IFLA_INFO_KIND, "can");
         {
             auto infodata = req.addNested(IFLA_INFO_DATA);
             /* For CAN FD, it would require to add IFLA_CAN_DATA_BITTIMING
diff --git a/automotive/can/1.0/default/libnetdevice/include/libnetdevice/libnetdevice.h b/automotive/can/1.0/default/libnetdevice/include/libnetdevice/libnetdevice.h
index 15ff491..04d1e0a 100644
--- a/automotive/can/1.0/default/libnetdevice/include/libnetdevice/libnetdevice.h
+++ b/automotive/can/1.0/default/libnetdevice/include/libnetdevice/libnetdevice.h
@@ -161,6 +161,15 @@
 bool del(std::string_view dev);
 
 /**
+ * Rename interface.
+ *
+ * \param from the name of the interface to rename from
+ * \param to the name of the interface to rename to
+ * \return true in case of success, false otherwise
+ */
+bool rename(std::string_view from, std::string_view to);
+
+/**
  * Fetches interface's hardware address.
  *
  * \param ifname Interface name
diff --git a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
index 9bb1a57..f149c45 100644
--- a/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
+++ b/automotive/can/1.0/default/libnetdevice/libnetdevice.cpp
@@ -126,6 +126,10 @@
     req->ifa_prefixlen = prefixlen;
     req->ifa_flags = IFA_F_SECONDARY;
     req->ifa_index = nametoindex(ifname);
+    if (req->ifa_index == 0) {
+        LOG(ERROR) << "Interface " << ifname << " doesn't exist";
+        return false;
+    }
 
     auto addrn = inetAddr(addr);
     req.add(IFLA_ADDRESS, addrn);
@@ -141,7 +145,7 @@
 
     {
         auto linkinfo = req.addNested(IFLA_LINKINFO);
-        req.addBuffer(IFLA_INFO_KIND, type);
+        req.add(IFLA_INFO_KIND, type);
     }
 
     nl::Socket sock(NETLINK_ROUTE);
@@ -156,6 +160,20 @@
     return sock.send(req) && sock.receiveAck(req);
 }
 
+bool rename(std::string_view from, std::string_view to) {
+    nl::MessageFactory<ifinfomsg> req(RTM_SETLINK);
+    req.add(IFLA_IFNAME, to);
+
+    req->ifi_index = nametoindex(from);
+    if (req->ifi_index == 0) {
+        LOG(ERROR) << "Interface " << from << " doesn't exist";
+        return false;
+    }
+
+    nl::Socket sock(NETLINK_ROUTE);
+    return sock.send(req) && sock.receiveAck(req);
+}
+
 std::optional<hwaddr_t> getHwAddr(std::string_view ifname) {
     auto ifr = ifreqs::fromName(ifname);
     if (!ifreqs::send(SIOCGIFHWADDR, ifr)) return std::nullopt;
diff --git a/automotive/can/1.0/default/libnetdevice/vlan.cpp b/automotive/can/1.0/default/libnetdevice/vlan.cpp
index e5b5a61..570545e 100644
--- a/automotive/can/1.0/default/libnetdevice/vlan.cpp
+++ b/automotive/can/1.0/default/libnetdevice/vlan.cpp
@@ -39,7 +39,7 @@
 
     {
         auto linkinfo = req.addNested(IFLA_LINKINFO);
-        req.addBuffer(IFLA_INFO_KIND, "vlan");
+        req.add(IFLA_INFO_KIND, "vlan");
 
         {
             auto linkinfo = req.addNested(IFLA_INFO_DATA);
diff --git a/automotive/can/1.0/default/libnl++/include/libnl++/MessageFactory.h b/automotive/can/1.0/default/libnl++/include/libnl++/MessageFactory.h
index f65f055..058b2cb 100644
--- a/automotive/can/1.0/default/libnl++/include/libnl++/MessageFactory.h
+++ b/automotive/can/1.0/default/libnl++/include/libnl++/MessageFactory.h
@@ -23,6 +23,7 @@
 #include <linux/netlink.h>
 
 #include <string>
+#include <type_traits>
 
 namespace android::nl {
 
@@ -109,25 +110,21 @@
      */
     template <class A>
     void add(nlattrtype_t type, const A& attr) {
-        addInternal(type, &attr, sizeof(attr));
+        static_assert(std::is_pod_v<A>, "POD type required");
+        add(type, &attr, sizeof(attr));
     }
 
-    // It will always send the last null character, otherwise use addBuffer
-    // variant instead
     template <>
     void add(nlattrtype_t type, const std::string& s) {
-        addInternal(type, s.c_str(), s.size() + 1);
+        add(type, s.c_str(), s.size());
     }
 
-    void addBuffer(nlattrtype_t type, const std::string_view& s) {
-        addInternal(type, s.data(), s.size());
-    }
+    void add(nlattrtype_t type, std::string_view s) { add(type, s.data(), s.size()); }
 
     /** Guard class to frame nested attributes. \see addNested(nlattrtype_t). */
     class [[nodiscard]] NestedGuard {
       public:
-        NestedGuard(MessageFactory& req, nlattrtype_t type)
-            : mReq(req), mAttr(req.addInternal(type)) {}
+        NestedGuard(MessageFactory& req, nlattrtype_t type) : mReq(req), mAttr(req.add(type)) {}
         ~NestedGuard() { closeNested(&mReq.mMessage.header, mAttr); }
 
       private:
@@ -148,7 +145,7 @@
      *    MessageFactory<ifinfomsg> req(RTM_NEWLINK, NLM_F_REQUEST);
      *    {
      *        auto linkinfo = req.addNested(IFLA_LINKINFO);
-     *        req.addBuffer(IFLA_INFO_KIND, "can");
+     *        req.add(IFLA_INFO_KIND, "can");
      *        {
      *            auto infodata = req.addNested(IFLA_INFO_DATA);
      *            req.add(IFLA_CAN_BITTIMING, bitTimingStruct);
@@ -164,7 +161,7 @@
     Message mMessage = {};
     bool mIsGood = true;
 
-    nlattr* addInternal(nlattrtype_t type, const void* data = nullptr, size_t len = 0) {
+    nlattr* add(nlattrtype_t type, const void* data = nullptr, size_t len = 0) {
         if (!mIsGood) return nullptr;
         auto attr = MessageFactoryBase::add(&mMessage.header, sizeof(mMessage), type, data, len);
         if (attr == nullptr) mIsGood = false;
diff --git a/automotive/vehicle/aidl/impl/3/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/3/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index f6098ca..0dd5e9f 100644
--- a/automotive/vehicle/aidl/impl/3/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/3/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -223,7 +223,8 @@
             return status;
         }
 
-        const SetValueResult& result = getSetValueResults().back();
+        std::vector<SetValueResult> resultVector = getSetValueResults();
+        const SetValueResult& result = resultVector.back();
 
         if (result.requestId != 0) {
             ALOGE("request ID mismatch, got %" PRId64 ", expect 0", result.requestId);
@@ -245,7 +246,8 @@
             return unexpected(status);
         }
 
-        const GetValueResult& result = getGetValueResults().back();
+        std::vector<GetValueResult> resultVector = getGetValueResults();
+        const GetValueResult& result = resultVector.back();
         if (result.requestId != 0) {
             ALOGE("request ID mismatch, got %" PRId64 ", expect 0", result.requestId);
             return unexpected(StatusCode::INTERNAL_ERROR);
@@ -277,7 +279,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<SetValueResult>& getSetValueResults() {
+    std::vector<SetValueResult> getSetValueResults() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mSetValueResults;
     }
@@ -291,7 +293,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<GetValueResult>& getGetValueResults() {
+    std::vector<GetValueResult> getGetValueResults() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mGetValueResults;
     }
@@ -309,7 +311,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<VehiclePropValue>& getChangedProperties() {
+    std::vector<VehiclePropValue> getChangedProperties() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mChangedProperties;
     }
diff --git a/automotive/vehicle/aidl/impl/3/vhal/Android.bp b/automotive/vehicle/aidl/impl/3/vhal/Android.bp
index a648fd4..22ea23d 100644
--- a/automotive/vehicle/aidl/impl/3/vhal/Android.bp
+++ b/automotive/vehicle/aidl/impl/3/vhal/Android.bp
@@ -47,6 +47,7 @@
 cc_library {
     name: "DefaultVehicleHal-V3",
     vendor: true,
+    host_supported: true,
     defaults: [
         "VehicleHalDefaults-V3",
     ],
diff --git a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
index 86ac92e..f71dead 100644
--- a/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
+++ b/automotive/vehicle/aidl/impl/current/default_config/config/DefaultProperties.json
@@ -2549,57 +2549,49 @@
             "property": "VehicleProperty::HVAC_TEMPERATURE_SET",
             "defaultValue": {
                 "floatValues": [
-                    17.0
+                    18.5
                 ]
             },
             "areas": [
                 {
                     "areaId": "Constants::SEAT_1_LEFT",
-                    "minFloatValue": 16.0,
-                    "maxFloatValue": 28.0
+                    "minFloatValue": 17.5,
+                    "maxFloatValue": 32.5
                 },
                 {
                     "areaId": "Constants::SEAT_1_RIGHT",
-                    "minFloatValue": 16.0,
-                    "maxFloatValue": 28.0
+                    "minFloatValue": 17.5,
+                    "maxFloatValue": 32.5
                 },
                 {
                     "areaId": "Constants::SEAT_2_LEFT",
-                    "minFloatValue": 16.0,
-                    "maxFloatValue": 28.0
+                    "minFloatValue": 17.5,
+                    "maxFloatValue": 32.5
                 },
                 {
                     "areaId": "Constants::SEAT_2_RIGHT",
-                    "minFloatValue": 16.0,
-                    "maxFloatValue": 28.0
+                    "minFloatValue": 17.5,
+                    "maxFloatValue": 32.5
                 },
                 {
                     "areaId": "Constants::SEAT_2_CENTER",
-                    "minFloatValue": 16.0,
-                    "maxFloatValue": 28.0
+                    "minFloatValue": 17.5,
+                    "maxFloatValue": 32.5
                 }
             ],
             "comment":
                     "minFloatValue and maxFloatValue in area config should match corresponding values in configArray",
             "configArray": [
-                160,
-                280,
+                175,
+                325,
                 5,
-                608,
-                824,
-                9
+                600,
+                900,
+                10
             ]
         },
         {
-            "property": "VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION",
-            "defaultValue": {
-                "floatValues": [
-                    66.19999694824219,
-                    "VehicleUnit::FAHRENHEIT",
-                    19.0,
-                    66.2
-                ]
-            }
+            "property": "VehicleProperty::HVAC_TEMPERATURE_VALUE_SUGGESTION"
         },
         {
             "property": "VehicleProperty::ENV_OUTSIDE_TEMPERATURE",
diff --git a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
index a097135..df5c2a3 100644
--- a/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
+++ b/automotive/vehicle/aidl/impl/current/fake_impl/hardware/test/FakeVehicleHardwareTest.cpp
@@ -223,7 +223,8 @@
             return status;
         }
 
-        const SetValueResult& result = getSetValueResults().back();
+        std::vector<SetValueResult> resultVector = getSetValueResults();
+        const SetValueResult& result = resultVector.back();
 
         if (result.requestId != 0) {
             ALOGE("request ID mismatch, got %" PRId64 ", expect 0", result.requestId);
@@ -245,7 +246,8 @@
             return unexpected(status);
         }
 
-        const GetValueResult& result = getGetValueResults().back();
+        std::vector<GetValueResult> resultVector = getGetValueResults();
+        const GetValueResult& result = resultVector.back();
         if (result.requestId != 0) {
             ALOGE("request ID mismatch, got %" PRId64 ", expect 0", result.requestId);
             return unexpected(StatusCode::INTERNAL_ERROR);
@@ -277,7 +279,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<SetValueResult>& getSetValueResults() {
+    std::vector<SetValueResult> getSetValueResults() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mSetValueResults;
     }
@@ -291,7 +293,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<GetValueResult>& getGetValueResults() {
+    std::vector<GetValueResult> getGetValueResults() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mGetValueResults;
     }
@@ -309,7 +311,7 @@
         mCv.notify_all();
     }
 
-    const std::vector<VehiclePropValue>& getChangedProperties() {
+    std::vector<VehiclePropValue> getChangedProperties() {
         std::scoped_lock<std::mutex> lockGuard(mLock);
         return mChangedProperties;
     }
@@ -3064,8 +3066,8 @@
 TEST_F(FakeVehicleHardwareTest, GetPropertyWithPropertyNameAreaName) {
     auto result = getHardware()->dump({"--get", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT"});
 
-    // Default value is 17
-    ASSERT_THAT(result.buffer, ContainsRegex("17"));
+    // Default value is 18.5
+    ASSERT_THAT(result.buffer, ContainsRegex("18.5"));
 
     getHardware()->dump({"--set", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT", "-f", "22"});
     result = getHardware()->dump({"--get", "HVAC_TEMPERATURE_SET", "-a", "ROW_1_LEFT"});
@@ -3680,7 +3682,7 @@
             .areaId = HVAC_ALL,
             .value.floatValues = {0, 0, 0, 0},
     };
-    status = setValue(floatArraySizeFive);
+    status = setValue(invalidUnit);
     EXPECT_EQ(status, StatusCode::INVALID_ARG);
     clearChangedProperties();
 
@@ -3924,9 +3926,9 @@
                                                     {minTempInFahrenheit +
                                                              incrementInFahrenheit * 2.5f,
                                                      FAHRENHEIT,
-                                                     minTempInCelsius + incrementInCelsius * 2,
+                                                     minTempInCelsius + incrementInCelsius * 3,
                                                      minTempInFahrenheit +
-                                                             incrementInFahrenheit * 2},
+                                                             incrementInFahrenheit * 3},
                                     },
                             },
             },
diff --git a/automotive/vehicle/aidl/impl/current/vhal/Android.bp b/automotive/vehicle/aidl/impl/current/vhal/Android.bp
index 8764eff..cfc2b34 100644
--- a/automotive/vehicle/aidl/impl/current/vhal/Android.bp
+++ b/automotive/vehicle/aidl/impl/current/vhal/Android.bp
@@ -47,6 +47,7 @@
 cc_library {
     name: "DefaultVehicleHal",
     vendor: true,
+    host_supported: true,
     defaults: [
         "VehicleHalDefaults",
     ],
diff --git a/biometrics/common/util/CancellationSignal.cpp b/biometrics/common/util/CancellationSignal.cpp
index 7888838..2bfc39e 100644
--- a/biometrics/common/util/CancellationSignal.cpp
+++ b/biometrics/common/util/CancellationSignal.cpp
@@ -22,10 +22,13 @@
 namespace aidl::android::hardware::biometrics {
 
 CancellationSignal::CancellationSignal(std::promise<void>&& cancellationPromise)
-    : mCancellationPromise(std::move(cancellationPromise)) {}
+    : mCancellationPromise(std::move(cancellationPromise)), isSet(false) {}
 
 ndk::ScopedAStatus CancellationSignal::cancel() {
-    mCancellationPromise.set_value();
+    if (!isSet) {
+        mCancellationPromise.set_value();
+        isSet = true;
+    }
     return ndk::ScopedAStatus::ok();
 }
 
diff --git a/biometrics/common/util/include/util/CancellationSignal.h b/biometrics/common/util/include/util/CancellationSignal.h
index be77e29..d5a9a1d 100644
--- a/biometrics/common/util/include/util/CancellationSignal.h
+++ b/biometrics/common/util/include/util/CancellationSignal.h
@@ -30,6 +30,7 @@
 
   private:
     std::promise<void> mCancellationPromise;
+    bool isSet;
 };
 
 // Returns whether the given cancellation future is ready, i.e. whether the operation corresponding
diff --git a/biometrics/fingerprint/aidl/vts/Android.bp b/biometrics/fingerprint/aidl/vts/Android.bp
index 628f03f..7c9cd8c 100644
--- a/biometrics/fingerprint/aidl/vts/Android.bp
+++ b/biometrics/fingerprint/aidl/vts/Android.bp
@@ -27,4 +27,5 @@
         "general-tests",
         "vts",
     ],
+    disable_framework: true,
 }
diff --git a/biometrics/fingerprint/aidl/vts/VtsHalBiometricsFingerprintTargetTest.cpp b/biometrics/fingerprint/aidl/vts/VtsHalBiometricsFingerprintTargetTest.cpp
index 1cd8c76..2cc5e56 100644
--- a/biometrics/fingerprint/aidl/vts/VtsHalBiometricsFingerprintTargetTest.cpp
+++ b/biometrics/fingerprint/aidl/vts/VtsHalBiometricsFingerprintTargetTest.cpp
@@ -167,6 +167,7 @@
 
     void TearDown() override {
         // Close the mSession.
+        ASSERT_NE(mSession, nullptr);
         ASSERT_TRUE(mSession->close().isOk());
 
         // Make sure the mSession is closed.
diff --git a/compatibility_matrices/bump.py b/compatibility_matrices/bump.py
index 33b41ce..bbc4a11 100755
--- a/compatibility_matrices/bump.py
+++ b/compatibility_matrices/bump.py
@@ -14,9 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-"""
-Creates the next compatibility matrix.
-"""
+"""Creates the next compatibility matrix."""
 
 import argparse
 import os
@@ -27,199 +25,354 @@
 
 
 def check_call(*args, **kwargs):
-    print(args)
-    subprocess.check_call(*args, **kwargs)
+  print(args)
+  subprocess.check_call(*args, **kwargs)
 
 
 def check_output(*args, **kwargs):
-    print(args)
-    return subprocess.check_output(*args, **kwargs)
+  print(args)
+  return subprocess.check_output(*args, **kwargs)
 
 
 class Bump(object):
 
-    def __init__(self, cmdline_args):
-        self.top = pathlib.Path(os.environ["ANDROID_BUILD_TOP"])
-        self.interfaces_dir = self.top / "hardware/interfaces"
+  def __init__(self, cmdline_args):
+    self.top = pathlib.Path(os.environ["ANDROID_BUILD_TOP"])
+    self.interfaces_dir = self.top / "hardware/interfaces"
 
-        self.current_level = cmdline_args.current_level
-        self.current_letter = cmdline_args.current_letter
-        self.current_version = cmdline_args.platform_version
-        self.next_version = cmdline_args.next_platform_version
-        self.current_module_name = f"framework_compatibility_matrix.{self.current_level}.xml"
-        self.current_xml = self.interfaces_dir / f"compatibility_matrices/compatibility_matrix.{self.current_level}.xml"
-        self.device_module_name = "framework_compatibility_matrix.device.xml"
+    self.current_level = cmdline_args.current_level
+    self.current_letter = cmdline_args.current_letter
+    self.current_version = cmdline_args.platform_version
+    self.next_version = cmdline_args.next_platform_version
+    self.current_module_name = (
+        f"framework_compatibility_matrix.{self.current_level}.xml"
+    )
+    self.current_xml = (
+        self.interfaces_dir
+        / f"compatibility_matrices/compatibility_matrix.{self.current_level}.xml"
+    )
+    self.device_module_name = "framework_compatibility_matrix.device.xml"
 
-        self.next_level = cmdline_args.next_level
-        self.next_letter = cmdline_args.next_letter
-        self.next_module_name = f"framework_compatibility_matrix.{self.next_level}.xml"
-        self.next_xml = self.interfaces_dir / f"compatibility_matrices/compatibility_matrix.{self.next_level}.xml"
+    self.next_level = cmdline_args.next_level
+    self.next_letter = cmdline_args.next_letter
+    self.current_sdk = cmdline_args.current_sdk
+    self.next_sdk = cmdline_args.next_sdk
+    self.next_module_name = (
+        f"framework_compatibility_matrix.{self.next_level}.xml"
+    )
+    self.next_xml = (
+        self.interfaces_dir
+        / f"compatibility_matrices/compatibility_matrix.{self.next_level}.xml"
+    )
 
-    def run(self):
-        self.bump_kernel_configs()
-        self.copy_matrix()
-        self.edit_android_bp()
-        self.bump_libvintf()
-        self.bump_libvts_vintf()
+  def run(self):
+    self.bump_kernel_configs()
+    self.copy_matrix()
+    self.edit_android_bp()
+    self.bump_libvintf()
+    self.bump_libvts_vintf()
+    self.bump_cuttlefish()
 
-    def bump_kernel_configs(self):
-        check_call([
-            self.top / "kernel/configs/tools/bump.py",
-            self.current_letter.lower(),
-            self.next_letter.lower(),
-        ])
+  def bump_kernel_configs(self):
+    check_call([
+        self.top / "kernel/configs/tools/bump.py",
+        self.current_letter.lower(),
+        self.next_letter.lower(),
+    ])
 
-    def copy_matrix(self):
-        with open(self.current_xml) as f_current, open(self.next_xml, "w") as f_next:
-            f_next.write(f_current.read().replace(f"level=\"{self.current_level}\"", f"level=\"{self.next_level}\""))
+  def copy_matrix(self):
+    with open(self.current_xml) as f_current, open(
+        self.next_xml, "w"
+    ) as f_next:
+      f_next.write(
+          f_current.read().replace(
+              f'level="{self.current_level}"', f'level="{self.next_level}"'
+          )
+      )
 
-    def edit_android_bp(self):
-        android_bp = self.interfaces_dir / "compatibility_matrices/Android.bp"
+  def edit_android_bp(self):
+    android_bp = self.interfaces_dir / "compatibility_matrices/Android.bp"
 
-        with open(android_bp, "r+") as f:
-            if self.next_module_name not in f.read():
-                f.seek(0, 2)  # end of file
-                f.write("\n")
-                f.write(
-                    textwrap.dedent(f"""\
+    with open(android_bp, "r+") as f:
+      if self.next_module_name not in f.read():
+        f.seek(0, 2)  # end of file
+        f.write("\n")
+        f.write(textwrap.dedent(f"""\
                         vintf_compatibility_matrix {{
                             name: "{self.next_module_name}",
                         }}
                     """))
 
-        next_kernel_configs = check_output(
-            """grep -rh name: | sed -E 's/^.*"(.*)".*/\\1/g'""",
-            cwd=self.top / "kernel/configs" /
-            self.next_letter.lower(),
-            text=True,
-            shell=True,
-        ).splitlines()
-        print(next_kernel_configs)
+    next_kernel_configs = check_output(
+        """grep -rh name: | sed -E 's/^.*"(.*)".*/\\1/g'""",
+        cwd=self.top / "kernel/configs" / self.next_letter.lower(),
+        text=True,
+        shell=True,
+    ).splitlines()
+    print(next_kernel_configs)
 
-        check_call([
-            "bpmodify", "-w", "-m", self.next_module_name, "-property", "stem",
-            "-str", self.next_xml.name, android_bp
-        ])
+    check_call([
+        "bpmodify",
+        "-w",
+        "-m",
+        self.next_module_name,
+        "-property",
+        "stem",
+        "-str",
+        self.next_xml.name,
+        android_bp,
+    ])
 
-        check_call([
-            "bpmodify", "-w", "-m", self.next_module_name, "-property", "srcs",
-            "-a",
-            self.next_xml.relative_to(android_bp.parent), android_bp
-        ])
+    check_call([
+        "bpmodify",
+        "-w",
+        "-m",
+        self.next_module_name,
+        "-property",
+        "srcs",
+        "-a",
+        self.next_xml.relative_to(android_bp.parent),
+        android_bp,
+    ])
 
-        check_call([
-            "bpmodify", "-w", "-m", self.next_module_name, "-property",
-            "kernel_configs", "-a", " ".join(next_kernel_configs), android_bp
-        ])
+    check_call([
+        "bpmodify",
+        "-w",
+        "-m",
+        self.next_module_name,
+        "-property",
+        "kernel_configs",
+        "-a",
+        " ".join(next_kernel_configs),
+        android_bp,
+    ])
 
-        # Replace the phony module's product_variables entry to add the new FCM
-        # to the development targets (trunk* configs).
-        lines = []
-        with open(android_bp) as f:
-            for line in f:
-              if f"                \"{self.current_module_name}\",\n" in line:
-                  lines.append(f"                \"{self.next_module_name}\",\n")
-              else:
-                  lines.append(line)
+    # Replace the phony module's product_variables entry to add the new FCM
+    # to the development targets (trunk* configs).
+    lines = []
+    with open(android_bp) as f:
+      for line in f:
+        if f'                "{self.current_module_name}",\n' in line:
+          lines.append(f'                "{self.next_module_name}",\n')
+        else:
+          lines.append(line)
 
-        with open(android_bp, "w") as f:
-            f.write("".join(lines))
+    with open(android_bp, "w") as f:
+      f.write("".join(lines))
 
-    def bump_libvintf(self):
-        if not self.current_version:
-            print("Skip libvintf update...")
-            return
-        try:
-            check_call(["grep", "-h",
-                        f"{self.next_letter.upper()} = {self.next_level}",
-                        f"{self.top}/system/libvintf/include/vintf/Level.h"])
-        except subprocess.CalledProcessError:
-            print("Adding new API level to libvintf")
-            add_lines_above(f"{self.top}/system/libvintf/analyze_matrix/analyze_matrix.cpp",
-                            "        case Level::UNSPECIFIED:",
-                            textwrap.indent(textwrap.dedent(f"""\
+  def bump_libvintf(self):
+    if not self.current_version:
+      print("Skip libvintf update...")
+      return
+    try:
+      check_call([
+          "grep",
+          "-h",
+          f"{self.next_letter.upper()} = {self.next_level}",
+          f"{self.top}/system/libvintf/include/vintf/Level.h",
+      ])
+    except subprocess.CalledProcessError:
+      print("Adding new API level to libvintf")
+      add_lines_above(
+          f"{self.top}/system/libvintf/analyze_matrix/analyze_matrix.cpp",
+          "        case Level::UNSPECIFIED:",
+          textwrap.indent(
+              textwrap.dedent(
+                  f"""\
                                     case Level::{self.next_letter.upper()}:
-                                        return "Android {self.next_version} ({self.next_letter.upper()})";"""),
-                            "    "*2))
-            add_lines_above(f"{self.top}/system/libvintf/include/vintf/Level.h",
-                            "    // To add new values:",
-                            f"    {self.next_letter.upper()} = {self.next_level},")
-            add_lines_above(f"{self.top}/system/libvintf/include/vintf/Level.h",
-                            "        Level::UNSPECIFIED,",
-                            f"        Level::{self.next_letter.upper()},")
-            add_lines_above(f"{self.top}/system/libvintf/RuntimeInfo.cpp",
-                            "            // Add more levels above this line.",
-                            textwrap.indent(textwrap.dedent(f"""\
+                                        return "Android {self.next_version} ({self.next_letter.upper()})";"""
+              ),
+              "    " * 2,
+          ),
+      )
+      add_lines_above(
+          f"{self.top}/system/libvintf/include/vintf/Level.h",
+          "    // To add new values:",
+          f"    {self.next_letter.upper()} = {self.next_level},",
+      )
+      add_lines_above(
+          f"{self.top}/system/libvintf/include/vintf/Level.h",
+          "        Level::UNSPECIFIED,",
+          f"        Level::{self.next_letter.upper()},",
+      )
+      add_lines_above(
+          f"{self.top}/system/libvintf/RuntimeInfo.cpp",
+          "            // Add more levels above this line.",
+          textwrap.indent(
+              textwrap.dedent(f"""\
                                         case {self.next_version}: {{
                                             ret = Level::{self.next_letter.upper()};
                                         }} break;"""),
-                            "    "*3))
+              "    " * 3,
+          ),
+      )
 
-    def bump_libvts_vintf(self):
-      if not self.current_version:
-        print("Skip libvts_vintf update...")
-        return
-      try:
-        check_call(["grep", "-h",
-                    f"{self.next_level}, Level::{self.next_letter.upper()}",
-                    f"{self.top}/test/vts-testcase/hal/treble/vintf/libvts_vintf_test_common/common.cpp"])
-        print("libvts_vintf is already up-to-date")
-      except subprocess.CalledProcessError:
-        print("Adding new API level to libvts_vintf")
-        add_lines_below(f"{self.top}/test/vts-testcase/hal/treble/vintf/libvts_vintf_test_common/common.cpp",
-                        f"        {{{self.current_level}, Level::{self.current_letter.upper()}}},",
-                        f"        {{{self.next_level}, Level::{self.next_letter.upper()}}},\n")
+  def bump_libvts_vintf(self):
+    if not self.current_version:
+      print("Skip libvts_vintf update...")
+      return
+    try:
+      check_call([
+          "grep",
+          "-h",
+          f"{self.next_level}, Level::{self.next_letter.upper()}",
+          f"{self.top}/test/vts-testcase/hal/treble/vintf/libvts_vintf_test_common/common.cpp",
+      ])
+      print("libvts_vintf is already up-to-date")
+    except subprocess.CalledProcessError:
+      print("Adding new API level to libvts_vintf")
+      add_lines_below(
+          f"{self.top}/test/vts-testcase/hal/treble/vintf/libvts_vintf_test_common/common.cpp",
+          f"        {{{self.current_level},"
+          f" Level::{self.current_letter.upper()}}},",
+          f"        {{{self.next_level},"
+          f" Level::{self.next_letter.upper()}}},\n",
+      )
 
-def add_lines_above(file, pattern, lines):
-    with open(file, 'r+') as f:
-        text = f.read()
-        split_text = re.split(rf"\n{pattern}\n", text)
-        if len(split_text) != 2:
-            # Only one pattern must be found, otherwise the source must be
-            # changed unexpectedly.
-            raise Exception(
-                f'Pattern "{pattern}" not found or multiple patterns found in {file}')
-        f.seek(0)
-        f.write(f"\n{lines}\n{pattern}\n".join(split_text))
-        f.truncate()
-
-def add_lines_below(file, pattern, lines):
-    final_lines = []
-    with open(file, 'r+') as f:
+  def bump_cuttlefish(self):
+    if not self.next_sdk:
+      print("Skip Cuttlefish update...")
+      return
+    cf_mk_file = f"{self.top}/device/google/cuttlefish/shared/device.mk"
+    try:
+      check_call([
+          "grep",
+          "-h",
+          f"PRODUCT_SHIPPING_API_LEVEL := {self.next_sdk}",
+          cf_mk_file,
+      ])
+      print("Cuttlefish is already up-to-date")
+    except subprocess.CalledProcessError:
+      print("Bumping Cuttlefish to the next SHIPPING_API_LEVEL")
+      final_lines = []
+      with open(cf_mk_file, "r+") as f:
         for line in f:
-          final_lines.append(line)
-          if pattern in line:
-              final_lines.append(lines)
+          if f"PRODUCT_SHIPPING_API_LEVEL := {self.current_sdk}" in line:
+            final_lines.append(
+                f"PRODUCT_SHIPPING_API_LEVEL := {self.next_sdk}\n"
+            )
+          elif line.startswith("PRODUCT_SHIPPING_API_LEVEL :="):
+            # this is the previous SDK level.
+            final_lines.append(
+                f"PRODUCT_SHIPPING_API_LEVEL := {self.current_sdk}\n"
+            )
+          else:
+            final_lines.append(line)
         f.seek(0)
         f.write("".join(final_lines))
         f.truncate()
+    final_lines = []
+    with open(
+        f"{self.top}/device/google/cuttlefish/shared/config/previous_manifest.xml",
+        "r+",
+    ) as f:
+      for line in f:
+        if "target-level=" in line:
+          final_lines.append(
+              '<manifest version="1.0" type="device"'
+              f' target-level="{self.current_level}">\n'
+          )
+        else:
+          final_lines.append(line)
+      f.seek(0)
+      f.write("".join(final_lines))
+      f.truncate()
+
+    final_lines = []
+    with open(
+        f"{self.top}/device/google/cuttlefish/shared/config/manifest.xml", "r+"
+    ) as f:
+      for line in f:
+        if "target-level=" in line:
+          final_lines.append(
+              '<manifest version="1.0" type="device"'
+              f' target-level="{self.next_level}">\n'
+          )
+        else:
+          final_lines.append(line)
+      f.seek(0)
+      f.write("".join(final_lines))
+      f.truncate()
+
+
+def add_lines_above(file, pattern, lines):
+  with open(file, "r+") as f:
+    text = f.read()
+    split_text = re.split(rf"\n{pattern}\n", text)
+    if len(split_text) != 2:
+      # Only one pattern must be found, otherwise the source must be
+      # changed unexpectedly.
+      raise Exception(
+          f'Pattern "{pattern}" not found or multiple patterns found in {file}'
+      )
+    f.seek(0)
+    f.write(f"\n{lines}\n{pattern}\n".join(split_text))
+    f.truncate()
+
+
+def add_lines_below(file, pattern, lines):
+  final_lines = []
+  with open(file, "r+") as f:
+    for line in f:
+      final_lines.append(line)
+      if pattern in line:
+        final_lines.append(lines)
+    f.seek(0)
+    f.write("".join(final_lines))
+    f.truncate()
+
 
 def main():
-    parser = argparse.ArgumentParser(description=__doc__)
-    parser.add_argument("current_level",
-                        type=str,
-                        help="VINTF level of the current version (e.g. 202404)")
-    parser.add_argument("next_level",
-                        type=str,
-                        help="VINTF level of the next version (e.g. 202504)")
-    parser.add_argument("current_letter",
-                        type=str,
-                        help="Letter of the API level of the current version (e.g. b)")
-    parser.add_argument("next_letter",
-                        type=str,
-                        help="Letter of the API level of the next version (e.g. c)")
-    parser.add_argument("platform_version",
-                        type=str,
-                        nargs="?",
-                        help="Current Android release version number (e.g. 16)")
-    parser.add_argument("next_platform_version",
-                        type=str,
-                        nargs="?",
-                        help="Next Android release version number number (e.g. 17)")
-    cmdline_args = parser.parse_args()
+  parser = argparse.ArgumentParser(description=__doc__)
+  parser.add_argument(
+      "current_level",
+      type=str,
+      help="VINTF level of the current version (e.g. 202404)",
+  )
+  parser.add_argument(
+      "next_level",
+      type=str,
+      help="VINTF level of the next version (e.g. 202504)",
+  )
+  parser.add_argument(
+      "current_letter",
+      type=str,
+      help="Letter of the API level of the current version (e.g. b)",
+  )
+  parser.add_argument(
+      "next_letter",
+      type=str,
+      help="Letter of the API level of the next version (e.g. c)",
+  )
+  parser.add_argument(
+      "platform_version",
+      type=str,
+      nargs="?",
+      help="Current Android release version number (e.g. 16)",
+  )
+  parser.add_argument(
+      "next_platform_version",
+      type=str,
+      nargs="?",
+      help="Next Android release version number number (e.g. 17)",
+  )
+  parser.add_argument(
+      "current_sdk",
+      type=str,
+      nargs="?",
+      help="Version of the current SDK API level (e.g. 36)",
+  )
+  parser.add_argument(
+      "next_sdk",
+      type=str,
+      nargs="?",
+      help="Version of the next SDK API level(e.g. 37)",
+  )
 
-    Bump(cmdline_args).run()
+  cmdline_args = parser.parse_args()
+
+  Bump(cmdline_args).run()
 
 
 if __name__ == "__main__":
-    main()
+  main()
diff --git a/compatibility_matrices/finalize.py b/compatibility_matrices/finalize.py
index ae048ea..1938278 100755
--- a/compatibility_matrices/finalize.py
+++ b/compatibility_matrices/finalize.py
@@ -14,8 +14,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
-"""
-Finalizes the current compatibility matrix and allows `next` targets to
+"""Finalizes the current compatibility matrix and allows `next` targets to
+
 use the new FCM.
 """
 
@@ -28,52 +28,59 @@
 
 
 def check_call(*args, **kwargs):
-    print(args)
-    subprocess.check_call(*args, **kwargs)
+  print(args)
+  subprocess.check_call(*args, **kwargs)
+
 
 def check_output(*args, **kwargs):
-    print(args)
-    return subprocess.check_output(*args, **kwargs)
+  print(args)
+  return subprocess.check_output(*args, **kwargs)
+
 
 class Bump(object):
 
-    def __init__(self, cmdline_args):
-        self.top = pathlib.Path(os.environ["ANDROID_BUILD_TOP"])
-        self.interfaces_dir = self.top / "hardware/interfaces"
+  def __init__(self, cmdline_args):
+    self.top = pathlib.Path(os.environ["ANDROID_BUILD_TOP"])
+    self.interfaces_dir = self.top / "hardware/interfaces"
 
-        self.current_level = cmdline_args.current_level
-        self.current_module_name = f"framework_compatibility_matrix.{self.current_level}.xml"
-        self.device_module_name = "framework_compatibility_matrix.device.xml"
+    self.current_level = cmdline_args.current_level
+    self.current_module_name = (
+        f"framework_compatibility_matrix.{self.current_level}.xml"
+    )
+    self.device_module_name = "framework_compatibility_matrix.device.xml"
 
-    def run(self):
-        self.edit_android_bp()
+  def run(self):
+    self.edit_android_bp()
 
-    def edit_android_bp(self):
-        android_bp = self.interfaces_dir / "compatibility_matrices/Android.bp"
+  def edit_android_bp(self):
+    android_bp = self.interfaces_dir / "compatibility_matrices/Android.bp"
 
-        # update the SYSTEM_MATRIX_DEPS variable to unconditionally include the
-        # latests FCM. This adds the file to `next` configs so releasing devices
-        # can use the latest interfaces.
-        lines = []
-        with open(android_bp) as f:
-            for line in f:
-              if f"    \"{self.device_module_name}\",\n" in line:
-                  lines.append(f"    \"{self.current_module_name}\",\n")
+    # update the SYSTEM_MATRIX_DEPS variable to unconditionally include the
+    # latests FCM. This adds the file to `next` configs so releasing devices
+    # can use the latest interfaces.
+    lines = []
+    with open(android_bp) as f:
+      for line in f:
+        if f'    "{self.device_module_name}",\n' in line:
+          lines.append(f'    "{self.current_module_name}",\n')
 
-              lines.append(line)
+        lines.append(line)
 
-        with open(android_bp, "w") as f:
-            f.write("".join(lines))
+    with open(android_bp, "w") as f:
+      f.write("".join(lines))
+
 
 def main():
-    parser = argparse.ArgumentParser(description=__doc__)
-    parser.add_argument("current_level",
-                        type=str,
-                        help="VINTF level of the current version (e.g. 202404)")
-    cmdline_args = parser.parse_args()
+  parser = argparse.ArgumentParser(description=__doc__)
+  parser.add_argument(
+      "current_level",
+      type=str,
+      help="VINTF level of the current version (e.g. 202404)",
+  )
+  cmdline_args = parser.parse_args()
 
-    Bump(cmdline_args).run()
+  Bump(cmdline_args).run()
 
 
 if __name__ == "__main__":
-    main()
+  main()
diff --git a/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp b/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
index 0430ea7..22ad5f0 100644
--- a/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
+++ b/graphics/allocator/aidl/vts/VtsHalGraphicsAllocatorAidl_TargetTest.cpp
@@ -162,11 +162,19 @@
     }
 
   private:
-    BufferDescriptor createDescriptor(const BufferDescriptorInfo& descriptorInfo) {
-        BufferDescriptor descriptor;
+    std::optional<BufferDescriptor> createDescriptor(const BufferDescriptorInfo& descriptorInfo,
+                                                     bool raise_failure) {
+        std::optional<BufferDescriptor> descriptor;
         mMapper4->createDescriptor(
                 convert(descriptorInfo), [&](const auto& tmpError, const auto& tmpDescriptor) {
-                    ASSERT_EQ(Error::NONE, tmpError) << "failed to create descriptor";
+                    if (raise_failure) {
+                        ASSERT_EQ(Error::NONE, tmpError) << "failed to create descriptor";
+                    }
+
+                    if (tmpError != Error::NONE) {
+                        return;
+                    }
+
                     descriptor = tmpDescriptor;
                 });
 
@@ -174,19 +182,24 @@
     }
 
   public:
-    std::unique_ptr<BufferHandle> allocate(const BufferDescriptorInfo& descriptorInfo) {
+    std::unique_ptr<BufferHandle> allocate(const BufferDescriptorInfo& descriptorInfo,
+                                           bool raise_failure = true) {
         AllocationResult result;
         ::ndk::ScopedAStatus status;
         if (mIAllocatorVersion >= 2) {
             status = mAllocator->allocate2(descriptorInfo, 1, &result);
         } else {
-            auto descriptor = createDescriptor(descriptorInfo);
+            auto descriptor = createDescriptor(descriptorInfo, raise_failure);
+            if (!descriptor.has_value()) {
+                return nullptr;
+            }
+
             if (::testing::Test::HasFatalFailure()) {
                 return nullptr;
             }
 #pragma clang diagnostic push
 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
-            status = mAllocator->allocate(descriptor, 1, &result);
+            status = mAllocator->allocate(descriptor.value(), 1, &result);
 #pragma clang diagnostic pop  // deprecation
         }
         if (!status.isOk()) {
@@ -380,7 +393,7 @@
             .reservedSize = 0,
     };
     const bool supported = isSupported(info);
-    auto buffer = allocate(info);
+    auto buffer = allocate(info, /*raise_failure=*/supported);
     if (!supported) {
         ASSERT_EQ(nullptr, buffer.get())
                 << "Allocation succeeded, but IMapper::isSupported was false";
@@ -422,7 +435,7 @@
             .reservedSize = 0,
     };
     const bool supported = isSupported(info);
-    auto buffer = allocate(info);
+    auto buffer = allocate(info, /*raise_failure=*/supported);
     if (!supported) {
         ASSERT_EQ(nullptr, buffer.get())
                 << "Allocation succeeded, but IMapper::isSupported was false";
@@ -480,4 +493,4 @@
         [](auto info) -> std::string {
             std::string name = std::to_string(info.index) + "/" + std::get<1>(info.param).name;
             return Sanitize(name);
-        });
\ No newline at end of file
+        });
diff --git a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientReader.h b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientReader.h
index 2196530..da6001a 100644
--- a/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientReader.h
+++ b/graphics/composer/aidl/include/android/hardware/graphics/composer3/ComposerClientReader.h
@@ -270,7 +270,7 @@
         for (auto& [layerId, luts] : displayLuts.layerLuts) {
             if (luts.pfd.get() >= 0) {
                 data.layerLuts.push_back(
-                        {layerId, Luts{ndk::ScopedFileDescriptor(luts.pfd.release()), luts.offsets,
+                        {layerId, Luts{ndk::ScopedFileDescriptor(dup(luts.pfd.get())), luts.offsets,
                                        luts.lutProperties}});
             }
         }
diff --git a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
index 9d90440..65e93c6 100644
--- a/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
+++ b/security/rkp/aidl/vts/functional/VtsRemotelyProvisionedComponentTests.cpp
@@ -60,6 +60,10 @@
 const string KEYMINT_STRONGBOX_INSTANCE_NAME =
         "android.hardware.security.keymint.IKeyMintDevice/strongbox";
 
+constexpr std::string_view kVerifiedBootState = "ro.boot.verifiedbootstate";
+constexpr std::string_view kDeviceState = "ro.boot.vbmeta.device_state";
+constexpr std::string_view kDefaultValue = "";
+
 #define INSTANTIATE_REM_PROV_AIDL_TEST(name)                                         \
     GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(name);                             \
     INSTANTIATE_TEST_SUITE_P(                                                        \
@@ -171,6 +175,37 @@
     return nullptr;
 }
 
+void unlockedBootloaderStatesImpliesNonNormalDiceChain(
+        const string& rpcInstanceName, std::shared_ptr<IRemotelyProvisionedComponent> rpc) {
+    auto challenge = randomBytes(MAX_CHALLENGE_SIZE);
+    bytevec csr;
+    auto status = rpc->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
+    ASSERT_TRUE(status.isOk()) << status.getDescription();
+
+    auto isProper = isCsrWithProperDiceChain(csr, rpcInstanceName);
+    ASSERT_TRUE(isProper) << isProper.message();
+    if (!*isProper) {
+        GTEST_SKIP() << "Skipping test: Only a proper DICE chain has a mode set.";
+    }
+
+    auto nonNormalMode = hasNonNormalModeInDiceChain(csr, rpcInstanceName);
+    ASSERT_TRUE(nonNormalMode) << nonNormalMode.message();
+
+    auto deviceState = ::android::base::GetProperty(string(kDeviceState), string(kDefaultValue));
+    auto verifiedBootState =
+            ::android::base::GetProperty(string(kVerifiedBootState), string(kDefaultValue));
+
+    ASSERT_TRUE(!deviceState.empty());
+    ASSERT_TRUE(!verifiedBootState.empty());
+
+    ASSERT_EQ(deviceState != "locked" || verifiedBootState != "green", *nonNormalMode)
+            << kDeviceState << " = '" << deviceState << "' and " << kVerifiedBootState << " = '"
+            << verifiedBootState << "', but the DICE "
+            << " chain has a " << (*nonNormalMode ? "non-normal" : "normal") << " DICE mode."
+            << " Locked devices must report normal, and unlocked devices must report "
+            << " non-normal.";
+}
+
 }  // namespace
 
 class VtsRemotelyProvisionedComponentTests : public testing::TestWithParam<std::string> {
@@ -345,7 +380,7 @@
  * is not "green" if and only if the mode on at least one certificate in the DICE chain
  * is non-normal.
  */
-TEST(NonParameterizedTests, unlockedBootloaderStatesImpliesNonnormalRkpVmDiceChain) {
+TEST(NonParameterizedTests, unlockedBootloaderStatesImpliesNonNormalRkpVmDiceChain) {
     if (!AServiceManager_isDeclared(RKPVM_INSTANCE_NAME.c_str())) {
         GTEST_SKIP() << "The RKP VM (" << RKPVM_INSTANCE_NAME << ") is not present on this device.";
     }
@@ -359,32 +394,31 @@
         GTEST_SKIP() << "The RKP VM is not supported on this system.";
     }
 
-    auto challenge = randomBytes(MAX_CHALLENGE_SIZE);
-    bytevec csr;
-    auto rkpVmStatus = rpc->generateCertificateRequestV2({} /* keysToSign */, challenge, &csr);
-    ASSERT_TRUE(rkpVmStatus.isOk()) << status.getDescription();
+    unlockedBootloaderStatesImpliesNonNormalDiceChain(RKPVM_INSTANCE_NAME, rpc);
+}
 
-    auto isProper = isCsrWithProperDiceChain(csr, RKPVM_INSTANCE_NAME);
-    ASSERT_TRUE(isProper) << isProper.message();
-    if (!*isProper) {
-        GTEST_SKIP() << "Skipping test: Only a proper DICE chain has a mode set.";
+/**
+ * If trusty.security_vm.keymint.enabled is set to "true", then do the following.
+ *
+ * Check that ro.boot.vbmeta.device_state is not "locked" or ro.boot.verifiedbootstate
+ * is not "green" if and only if the mode on at least one certificate in the DICE chain
+ * is non-normal.
+ */
+TEST(NonParameterizedTests, unlockedBootloaderStatesImpliesNonNormalKeyMintInAVmDiceChain) {
+    if (::android::base::GetBoolProperty("trusty.security_vm.keymint.enabled", false)) {
+        GTEST_SKIP() << "The KeyMint (" << DEFAULT_INSTANCE_NAME
+                     << ") instance is not inside a VM.";
     }
 
-    auto nonNormalMode = hasNonNormalModeInDiceChain(csr, RKPVM_INSTANCE_NAME);
-    ASSERT_TRUE(nonNormalMode) << nonNormalMode.message();
+    auto rpc = getHandle<IRemotelyProvisionedComponent>(DEFAULT_INSTANCE_NAME);
+    ASSERT_NE(rpc, nullptr) << "The KeyMint (" << DEFAULT_INSTANCE_NAME
+                            << ") instance RPC is unavailable.";
 
-    auto deviceState = ::android::base::GetProperty("ro.boot.vbmeta.device_state", "");
-    auto verifiedBootState = ::android::base::GetProperty("ro.boot.verifiedbootstate", "");
+    RpcHardwareInfo hardwareInfo;
+    auto status = rpc->getHardwareInfo(&hardwareInfo);
+    ASSERT_TRUE(status.isOk()) << status.getDescription();
 
-    ASSERT_TRUE(!deviceState.empty());
-    ASSERT_TRUE(!verifiedBootState.empty());
-
-    ASSERT_EQ(deviceState != "locked" || verifiedBootState != "green", *nonNormalMode)
-            << "ro.boot.vbmeta.device_state = '" << deviceState
-            << "' and ro.boot.verifiedbootstate = '" << verifiedBootState << "', but the DICE "
-            << " chain has a " << (*nonNormalMode ? "non-normal" : "normal") << " DICE mode."
-            << " Locked devices must report normal, and unlocked devices must report "
-            << " non-normal.";
+    unlockedBootloaderStatesImpliesNonNormalDiceChain(DEFAULT_INSTANCE_NAME, rpc);
 }
 
 using GetHardwareInfoTests = VtsRemotelyProvisionedComponentTests;
diff --git a/sensors/OWNERS b/sensors/OWNERS
index 5017a9a..b647f3b 100644
--- a/sensors/OWNERS
+++ b/sensors/OWNERS
@@ -1,3 +1,2 @@
 # Bug component: 62965
-
-bduddie@google.com
+include platform/frameworks/native:/services/sensorservice/OWNERS
\ No newline at end of file
diff --git a/usb/OWNERS b/usb/OWNERS
index 647d626..0c73782 100644
--- a/usb/OWNERS
+++ b/usb/OWNERS
@@ -1,8 +1,8 @@
 # Bug component: 175220
 
-anothermark@google.com
+vmartensson@google.com
+nkapron@google.com
 febinthattil@google.com
-aprasath@google.com
+shubhankarm@google.com
 albertccwang@google.com
-badhri@google.com
-kumarashishg@google.com
\ No newline at end of file
+badhri@google.com
\ No newline at end of file