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

Commit 80192a58 authored by Aniket Kumar Lata's avatar Aniket Kumar Lata Committed by android-build-merger
Browse files

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

am: a39f7f0e

Change-Id: Ie4272aae9b684e36c167f862ed9eb8f1b4e27ceb
parents 1704e2ef a39f7f0e
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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) {