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

Commit 7855d321 authored by Steven Moreland's avatar Steven Moreland Committed by Android (Google) Code Review
Browse files

Merge "RPC Binder: clearer errors for wrong transact type" into tm-dev

parents 7affacbd b5c6db48
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -701,7 +701,12 @@ status_t RpcState::processCommand(const sp<RpcSession::RpcConnection>& connectio

    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);
        case RPC_COMMAND_DEC_STRONG:
            return processDecStrong(connection, session, command);