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

Commit 9d14bfee authored by Steven Moreland's avatar Steven Moreland
Browse files

RPC Binder: clearer errors for wrong transact type

Bug: 423127919 # this bug error is totally different
 than this case. If we hit this case, we would have
 gotten a different harder error. However, I found
 this while looking at this bug.
Bug: 416734088
Test: binderRpcTest
Flag: EXEMPT bug fix
Change-Id: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
Merged-In: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
(cherry picked from commit 51ed14ee)
parent e7626987
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -790,7 +790,12 @@ status_t RpcState::processCommand(

    switch (command.command) {
        case RPC_COMMAND_TRANSACT:
            if (type != CommandType::ANY) return BAD_TYPE;
            if (type != CommandType::ANY) {
                ALOGE("CommandType %d, but got RPC command %d.", static_cast<int>(type),
                      command.command);
                (void)session->shutdownAndWait(false);
                return BAD_TYPE;
            }
            return processTransact(connection, session, command, std::move(ancillaryFds));
        case RPC_COMMAND_DEC_STRONG:
            return processDecStrong(connection, session, command);