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

Commit 6526cb99 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge "libbinder: empty ping transaction"

am: 67591ab4

Change-Id: Iffa3354c18966134fa3f2c6f45957ca1f872b12c
parents cec2b565 67591ab4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ status_t BBinder::transact(
    status_t err = NO_ERROR;
    switch (code) {
        case PING_TRANSACTION:
            reply->writeInt32(pingBinder());
            err = pingBinder();
            break;
        default:
            err = onTransact(code, data, reply, flags);
+1 −4
Original line number Diff line number Diff line
@@ -186,10 +186,7 @@ status_t BpBinder::pingBinder()
{
    Parcel send;
    Parcel reply;
    status_t err = transact(PING_TRANSACTION, send, &reply);
    if (err != NO_ERROR) return err;
    if (reply.dataSize() < sizeof(status_t)) return NOT_ENOUGH_DATA;
    return (status_t)reply.readInt32();
    return transact(PING_TRANSACTION, send, &reply);
}

status_t BpBinder::dump(int fd, const Vector<String16>& args)
+1 −7
Original line number Diff line number Diff line
@@ -286,13 +286,7 @@ TEST_F(BinderDriverInterfaceTest, Transaction) {
        EXPECT_EQ(0u, br.arg2.cookie);
        EXPECT_EQ(0u, br.arg2.code);
        EXPECT_EQ(0u, br.arg2.flags);

        // ping returns a 4 byte header in libbinder, but the original
        // C implementation of servicemanager returns a 0 byte header
        if (br.arg2.data_size != 0 && br.arg2.data_size != 4) {
            ADD_FAILURE() << br.arg2.data_size << " is expected to be 0 or 4";
        }

        EXPECT_EQ(0u, br.arg2.data_size);
        EXPECT_EQ(0u, br.arg2.offsets_size);

        SCOPED_TRACE("3rd WriteRead");