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

Commit 66a581fe authored by Chris Thornton's avatar Chris Thornton Committed by Android (Google) Code Review
Browse files

Merge "SoundTrigger: fix binder call status reporting." into mnc-dr-dev

parents 5f54de48 014620f1
Loading
Loading
Loading
Loading
+8 −6
Original line number Diff line number Diff line
@@ -60,11 +60,13 @@ public:
        data.writeInterfaceToken(ISoundTrigger::getInterfaceDescriptor());
        data.writeStrongBinder(IInterface::asBinder(modelMemory));
        status_t status = remote()->transact(LOAD_SOUND_MODEL, data, &reply);
        if (status != NO_ERROR ||
                (status = (status_t)reply.readInt32()) != NO_ERROR) {
        if (status != NO_ERROR) {
            return status;
        }
        status = (status_t)reply.readInt32();
        if (status == NO_ERROR) {
            reply.read(handle, sizeof(sound_model_handle_t));
        }
        return status;
    }

@@ -74,7 +76,7 @@ public:
        data.writeInterfaceToken(ISoundTrigger::getInterfaceDescriptor());
        data.write(&handle, sizeof(sound_model_handle_t));
        status_t status = remote()->transact(UNLOAD_SOUND_MODEL, data, &reply);
        if (status != NO_ERROR) {
        if (status == NO_ERROR) {
            status = (status_t)reply.readInt32();
        }
        return status;
@@ -93,7 +95,7 @@ public:
        }
        data.writeStrongBinder(IInterface::asBinder(dataMemory));
        status_t status = remote()->transact(START_RECOGNITION, data, &reply);
        if (status != NO_ERROR) {
        if (status == NO_ERROR) {
            status = (status_t)reply.readInt32();
        }
        return status;
@@ -105,7 +107,7 @@ public:
        data.writeInterfaceToken(ISoundTrigger::getInterfaceDescriptor());
        data.write(&handle, sizeof(sound_model_handle_t));
        status_t status = remote()->transact(STOP_RECOGNITION, data, &reply);
        if (status != NO_ERROR) {
        if (status == NO_ERROR) {
            status = (status_t)reply.readInt32();
        }
        return status;
+5 −2
Original line number Diff line number Diff line
@@ -85,8 +85,11 @@ public:
        data.writeInterfaceToken(ISoundTriggerHwService::getInterfaceDescriptor());
        data.write(&handle, sizeof(sound_trigger_module_handle_t));
        data.writeStrongBinder(IInterface::asBinder(client));
        remote()->transact(ATTACH, data, &reply);
        status_t status = reply.readInt32();
        status_t status = remote()->transact(ATTACH, data, &reply);
        if (status != NO_ERROR) {
            return status;
        }
        status = reply.readInt32();
        if (reply.readInt32() != 0) {
            module = interface_cast<ISoundTrigger>(reply.readStrongBinder());
        }