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

Commit 1bb99fd9 authored by David Li's avatar David Li Committed by Automerger Merge Worker
Browse files

Merge "allow standby function in the DRAINING and TRANSFERRING states" into 24D1-dev am: 6d33f8d8

parents cf1a60d9 6d33f8d8
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -202,8 +202,12 @@ status_t StreamHalAidl::standby() {
    StreamDescriptor::Reply reply;
    switch (state) {
        case StreamDescriptor::State::ACTIVE:
        case StreamDescriptor::State::DRAINING:
        case StreamDescriptor::State::TRANSFERRING:
            RETURN_STATUS_IF_ERROR(pause(&reply));
            if (reply.state != StreamDescriptor::State::PAUSED) {
            if (reply.state != StreamDescriptor::State::PAUSED &&
                    reply.state != StreamDescriptor::State::DRAIN_PAUSED &&
                    reply.state != StreamDescriptor::State::TRANSFER_PAUSED) {
                ALOGE("%s: unexpected stream state: %s (expected PAUSED)",
                        __func__, toString(reply.state).c_str());
                return INVALID_OPERATION;
@@ -211,6 +215,7 @@ status_t StreamHalAidl::standby() {
            FALLTHROUGH_INTENDED;
        case StreamDescriptor::State::PAUSED:
        case StreamDescriptor::State::DRAIN_PAUSED:
        case StreamDescriptor::State::TRANSFER_PAUSED:
            if (mIsInput) return flush();
            RETURN_STATUS_IF_ERROR(flush(&reply));
            if (reply.state != StreamDescriptor::State::IDLE) {