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

Commit 6463e76d authored by Marco Nelissen's avatar Marco Nelissen
Browse files

Make sure resume() and flush() are handled appropriately even if the codec

is in Loaded->Idle state.
b/8347958

Change-Id: Ic14d29502a7effc636251379bb1bbc25739db98e
parent ec24fa46
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -3416,6 +3416,21 @@ bool ACodec::LoadedToIdleState::onMessageReceived(const sp<AMessage> &msg) {
            return true;
        }

        case kWhatResume:
        {
            // We'll be active soon enough.
            return true;
        }

        case kWhatFlush:
        {
            // We haven't even started yet, so we're flushed alright...
            sp<AMessage> notify = mCodec->mNotify->dup();
            notify->setInt32("what", ACodec::kWhatFlushCompleted);
            notify->post();
            return true;
        }

        default:
            return BaseState::onMessageReceived(msg);
    }