Loading media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -1722,11 +1722,17 @@ void NuPlayer::Renderer::startAudioOffloadPauseTimeout() { } void NuPlayer::Renderer::cancelAudioOffloadPauseTimeout() { if (offloadingAudio()) { // We may have called startAudioOffloadPauseTimeout() without // the AudioSink open and with offloadingAudio enabled. // // When we cancel, it may be that offloadingAudio is subsequently disabled, so regardless // we always release the wakelock and increment the pause timeout generation. // // Note: The acquired wakelock prevents the device from suspending // immediately after offload pause (in case a resume happens shortly thereafter). mWakeLock->release(true); ++mAudioOffloadPauseTimeoutGeneration; } } status_t NuPlayer::Renderer::onOpenAudioSink( const sp<AMessage> &format, Loading Loading
media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp +10 −4 Original line number Diff line number Diff line Loading @@ -1722,11 +1722,17 @@ void NuPlayer::Renderer::startAudioOffloadPauseTimeout() { } void NuPlayer::Renderer::cancelAudioOffloadPauseTimeout() { if (offloadingAudio()) { // We may have called startAudioOffloadPauseTimeout() without // the AudioSink open and with offloadingAudio enabled. // // When we cancel, it may be that offloadingAudio is subsequently disabled, so regardless // we always release the wakelock and increment the pause timeout generation. // // Note: The acquired wakelock prevents the device from suspending // immediately after offload pause (in case a resume happens shortly thereafter). mWakeLock->release(true); ++mAudioOffloadPauseTimeoutGeneration; } } status_t NuPlayer::Renderer::onOpenAudioSink( const sp<AMessage> &format, Loading