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

Commit 719b8e84 authored by Eric Laurent's avatar Eric Laurent
Browse files

AudioPolicyManager: fix device role for capture preset in call

Add missing update of call routing when the device role for capture
preset is updated during a call.

Bug: 383996843
Test: make
Flag: EXEMPT bug fix
Change-Id: Ied9b32ef387708515077ec3d9d92797fd5c10bbc
parent af73b7b8
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -4609,6 +4609,7 @@ status_t AudioPolicyManager::setDevicesRoleForCapturePreset(

    if (status == NO_ERROR) {
        updateInputRouting();
        updateCallRouting(false /*fromCache*/);
    }
    return status;
}
@@ -4626,7 +4627,10 @@ status_t AudioPolicyManager::addDevicesRoleForCapturePreset(
            "Engine could not add preferred devices %s for audio source %d role %d",
            dumpAudioDeviceTypeAddrVector(devices).c_str(), audioSource, role);

    if (status == NO_ERROR) {
        updateInputRouting();
        updateCallRouting(false /*fromCache*/);
    }
    return status;
}

@@ -4647,6 +4651,7 @@ status_t AudioPolicyManager::removeDevicesRoleForCapturePreset(
            "Engine could not remove devices role (%d) for capture preset %d", role, audioSource);
    if (status == NO_ERROR) {
        updateInputRouting();
        updateCallRouting(false /*fromCache*/);
    }
    return status;
}
@@ -4660,6 +4665,7 @@ status_t AudioPolicyManager::clearDevicesRoleForCapturePreset(audio_source_t aud
            "Engine could not clear devices role (%d) for capture preset %d", role, audioSource);
    if (status == NO_ERROR) {
        updateInputRouting();
        updateCallRouting(false /*fromCache*/);
    }
    return status;
}