Loading bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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"; Loading Loading @@ -147,6 +150,7 @@ void BluetoothAudioProvider::binderDiedCallbackAidl(void* ptr) { LOG(ERROR) << __func__ << ": Null AudioProvider HAL died"; return; } provider->is_binder_died = true; provider->endSession(); } Loading bluetooth/audio/aidl/default/BluetoothAudioProvider.h +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading keymaster/4.0/support/fuzzer/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,12 @@ cc_defaults { "libbase", "liblog", "libkeymaster4support", "libutils", ], shared_libs: [ "android.hardware.keymaster@4.0", "libcrypto", "libhidlbase", "libutils", ], fuzz_config: { cc: [ Loading media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); Loading @@ -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__) Loading wifi/1.6/default/wifi_legacy_hal.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -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}; } Loading Loading
bluetooth/audio/aidl/default/BluetoothAudioProvider.cpp +6 −2 Original line number Diff line number Diff line Loading @@ -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); Loading @@ -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"; Loading Loading @@ -147,6 +150,7 @@ void BluetoothAudioProvider::binderDiedCallbackAidl(void* ptr) { LOG(ERROR) << __func__ << ": Null AudioProvider HAL died"; return; } provider->is_binder_died = true; provider->endSession(); } Loading
bluetooth/audio/aidl/default/BluetoothAudioProvider.h +1 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
keymaster/4.0/support/fuzzer/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -30,12 +30,12 @@ cc_defaults { "libbase", "liblog", "libkeymaster4support", "libutils", ], shared_libs: [ "android.hardware.keymaster@4.0", "libcrypto", "libhidlbase", "libutils", ], fuzz_config: { cc: [ Loading
media/omx/1.0/vts/functional/store/VtsHalMediaOmxV1_0TargetStoreTest.cpp +15 −3 Original line number Diff line number Diff line Loading @@ -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> Loading Loading @@ -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); Loading @@ -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__) Loading
wifi/1.6/default/wifi_legacy_hal.cpp +5 −4 Original line number Diff line number Diff line Loading @@ -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}; } Loading