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

Commit 6e8a79b4 authored by Eric Laurent's avatar Eric Laurent Committed by android-build-merger
Browse files

Merge "audio policy manager: do not reapply same forced usage" into oc-dev

am: 6aa929c9

Change-Id: I24d35bbf3c08960aefad9f18c243871ba508b7fe
parents baa89cc5 6aa929c9
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -638,6 +638,9 @@ void AudioPolicyManager::setForceUse(audio_policy_force_use_t usage,
                                         audio_policy_forced_cfg_t config)
{
    ALOGV("setForceUse() usage %d, config %d, mPhoneState %d", usage, config, mEngine->getPhoneState());
    if (config == mEngine->getForceUse(usage)) {
        return;
    }

    if (mEngine->setForceUse(usage, config) != NO_ERROR) {
        ALOGW("setForceUse() could not set force cfg %d for usage %d", config, usage);