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

Commit b4561f5b authored by Yuchen Liu's avatar Yuchen Liu Committed by Android (Google) Code Review
Browse files

Merge "Invalidate stream when unregistering audio policy mix"

parents f622abc2 f4de36d1
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -113,6 +113,9 @@ public:
    const sp<AudioPolicyMix> getPrimaryMix() const {
        return mPrimaryMix.promote();
    };
    bool hasLostPrimaryMix() const {
        return mPrimaryMix.unsafe_get() && !mPrimaryMix.promote();
    }

    void setActive(bool active) override
    {
+1 −1
Original line number Diff line number Diff line
@@ -5354,7 +5354,7 @@ void AudioPolicyManager::checkOutputForAttributes(const audio_attributes_t &attr
            if (status != OK) {
                continue;
            }
            if (client->getPrimaryMix() != primaryMix) {
            if (client->getPrimaryMix() != primaryMix || client->hasLostPrimaryMix()) {
                invalidate = true;
                if (desc->isStrategyActive(psId)) {
                    maxLatency = desc->latency();