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

Commit 0a0662ea authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "audio policy: improve accessibility routing" into lmp-mr1-dev

parents ad019236 2cbe89a8
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -596,6 +596,9 @@ void AudioPolicyManager::setPhoneState(audio_mode_t state)
            }
            handleIncallSonification((audio_stream_type_t)stream, false, true);
        }

        // force reevaluating accessibility routing when call starts
        mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
    }

    // store previous phone state for management of sonification strategy below
@@ -1290,6 +1293,11 @@ status_t AudioPolicyManager::startOutput(audio_io_handle_t output,
                        outputDesc->mPolicyMix->mRegistrationId);
        }

        // force reevaluating accessibility routing when ringtone or alarm starts
        if (strategy == STRATEGY_SONIFICATION) {
            mpClientInterface->invalidateStream(AUDIO_STREAM_ACCESSIBILITY);
        }

        if (waitMs > muteWaitMs) {
            usleep((waitMs - muteWaitMs) * 2 * 1000);
        }