Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae8d49f7 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8422005 from d667e658 to tm-release

Change-Id: Iababd80dc8611b4ada73cfcd8c691ccc36c9ee9c
parents 8ad6cbdc d667e658
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ ndk::ScopedAStatus BluetoothAudioProvider::startSession(
  latency_modes_ = latencyModes;
  audio_config_ = std::make_unique<AudioConfiguration>(audio_config);
  stack_iface_ = host_if;
  is_binder_died = false;

  AIBinder_linkToDeath(stack_iface_->asBinder().get(), death_recipient_.get(),
                       this);
@@ -59,8 +60,10 @@ ndk::ScopedAStatus BluetoothAudioProvider::endSession() {
  if (stack_iface_ != nullptr) {
    BluetoothAudioSessionReport::OnSessionEnded(session_type_);

    if (!is_binder_died) {
      AIBinder_unlinkToDeath(stack_iface_->asBinder().get(),
                             death_recipient_.get(), this);
    }
  } else {
    LOG(INFO) << __func__ << " - SessionType=" << toString(session_type_)
              << " has NO session";
@@ -147,6 +150,7 @@ void BluetoothAudioProvider::binderDiedCallbackAidl(void* ptr) {
    LOG(ERROR) << __func__ << ": Null AudioProvider HAL died";
    return;
  }
  provider->is_binder_died = true;
  provider->endSession();
}

+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ class BluetoothAudioProvider : public BnBluetoothAudioProvider {
  std::unique_ptr<AudioConfiguration> audio_config_ = nullptr;
  SessionType session_type_;
  std::vector<LatencyMode> latency_modes_;
  bool is_binder_died = false;
};

}  // namespace audio
+1 −1
Original line number Diff line number Diff line
@@ -30,12 +30,12 @@ cc_defaults {
        "libbase",
        "liblog",
        "libkeymaster4support",
        "libutils",
    ],
    shared_libs: [
        "android.hardware.keymaster@4.0",
        "libcrypto",
        "libhidlbase",
        "libutils",
    ],
    fuzz_config: {
        cc: [
+15 −3
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@
#include <android-base/strings.h>
#include <android/api-level.h>

#include <VtsCoreUtil.h>
#include <android/hardware/media/omx/1.0/IOmx.h>
#include <android/hardware/media/omx/1.0/IOmxNode.h>
#include <android/hardware/media/omx/1.0/IOmxObserver.h>
@@ -377,6 +378,10 @@ static int getFirstApiLevel() {
    return android::base::GetIntProperty("ro.product.first_api_level", __ANDROID_API_T__);
}

static bool isTV() {
    return testing::deviceSupportsFeature("android.software.leanback");
}

// list components and roles.
TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
    hidl_vec<IOmx::ComponentInfo> componentInfos = getComponentInfoList(omx);
@@ -384,10 +389,17 @@ TEST_P(StoreHidlTest, OmxCodecAllowedTest) {
        for (std::string role : info.mRoles) {
            if (role.find("video_decoder") != std::string::npos ||
                role.find("video_encoder") != std::string::npos) {
                // Codec2 is not mandatory on Android TV devices that launched with Android S
                if (isTV()) {
                    ASSERT_LT(getFirstApiLevel(), __ANDROID_API_T__)
                            << " Component: " << info.mName.c_str() << " Role: " << role.c_str()
                            << " not allowed for devices launching with Android T and above";
                } else {
                    ASSERT_LT(getFirstApiLevel(), __ANDROID_API_S__)
                            << " Component: " << info.mName.c_str() << " Role: " << role.c_str()
                            << " not allowed for devices launching with Android S and above";
                }
            }
            if (role.find("audio_decoder") != std::string::npos ||
                role.find("audio_encoder") != std::string::npos) {
                ASSERT_LT(getFirstApiLevel(), __ANDROID_API_T__)
+5 −4
Original line number Diff line number Diff line
@@ -1549,13 +1549,14 @@ wifi_error WifiLegacyHal::setIndoorState(bool isIndoor) {

std::pair<wifi_error, wifi_radio_combination_matrix*>
WifiLegacyHal::getSupportedRadioCombinationsMatrix() {
    std::array<char, kMaxSupportedRadioCombinationsMatrixLength> buffer;
    buffer.fill(0);
    char* buffer = new char[kMaxSupportedRadioCombinationsMatrixLength];
    std::fill(buffer, buffer + kMaxSupportedRadioCombinationsMatrixLength, 0);
    uint32_t size = 0;
    wifi_radio_combination_matrix* radio_combination_matrix_ptr =
            reinterpret_cast<wifi_radio_combination_matrix*>(buffer.data());
            reinterpret_cast<wifi_radio_combination_matrix*>(buffer);
    wifi_error status = global_func_table_.wifi_get_supported_radio_combinations_matrix(
            global_handle_, buffer.size(), &size, radio_combination_matrix_ptr);
            global_handle_, kMaxSupportedRadioCombinationsMatrixLength, &size,
            radio_combination_matrix_ptr);
    CHECK(size >= 0 && size <= kMaxSupportedRadioCombinationsMatrixLength);
    return {status, radio_combination_matrix_ptr};
}