Search code examples
androidaidl

AIDL inout param


I wanted to know what is the inout param in the AIDL is for?

I know what is in for and what out is for. (out does not marshal the object passing).

But I don't understand what is the inout for.

I have looked in the: "In/out/inout" in a AIDL interface parameter value? question but still did not understand.

From my testings the param is passed much like specifying it as in.

So if any1 can shed some light on what is inout It would be helpful.

Thanks


Solution

  • An in parameter is only transported from the caller to the callee. An out parameter is transported from the callee to the caller. And an inout parameter is transported both ways.

    You would use an inout paramter when you pass an object to the callee and the callee changes it.