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

Commit 3fd3acc9 authored by Huihong Luo's avatar Huihong Luo
Browse files

Add pending command buffer reset

when error occurs, so it won't affect the upcoming commands.

Bug: 273525126
Test: manual
Merged-In: If91cf6253b0d8f0d8c5d761f7cf257d090fcaf6f
Change-Id: I08f938764dda78e6a85e625ae6767816582f5312
parent 04a03845
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -765,6 +765,7 @@ Error AidlComposer::execute() {
        auto status = mAidlComposerClient->executeCommands(commands, &results);
        if (!status.isOk()) {
            ALOGE("executeCommands failed %s", status.getDescription().c_str());
            mWriter.reset();
            return static_cast<Error>(status.getServiceSpecificError());
        }

@@ -776,6 +777,7 @@ Error AidlComposer::execute() {
        const auto index = static_cast<size_t>(cmdErr.commandIndex);
        if (index < 0 || index >= commands.size()) {
            ALOGE("invalid command index %zu", index);
            mWriter.reset();
            return Error::BAD_PARAMETER;
        }