Merge "audiopolicy: add null pointer check for primary hw" am: 3e9dd76e81 am: a39f7f0e48

am: 80192a580f

Change-Id: I02becb696b081a7f7dc4f833326a33eab50b8334
gugelfrei
Aniket Kumar Lata 5 years ago committed by android-build-merger
commit c499a08925

@ -472,6 +472,10 @@ status_t AudioPolicyManager::getHwOffloadEncodingFormatsSupportedForA2DP(
std::unordered_set<audio_format_t> formatSet;
sp<HwModule> primaryModule =
mHwModules.getModuleFromName(AUDIO_HARDWARE_MODULE_ID_PRIMARY);
if (primaryModule == nullptr) {
ALOGE("%s() unable to get primary module", __func__);
return NO_INIT;
}
DeviceVector declaredDevices = primaryModule->getDeclaredDevices().getDevicesFromTypeMask(
AUDIO_DEVICE_OUT_ALL_A2DP);
for (const auto& device : declaredDevices) {

Loading…
Cancel
Save