The case is: In server, I have an object A, then transfer it to another program in client via Interprocess Communication (e.g. AIDL).

By AIDL, the object A in server will be decomposed --> transferred --> and recovered in the client. Let's say it is recovered as object A' in program in the client.

My question is: Is there something connect with object A and A' ? In other words, after transferring the object A to another program via IPC, can we obtain the reference of original object A in the program in the client ?

1

There are 1 best solutions below

2
On BEST ANSWER

Is there something connect with object A and A' ?

No, for most data types. A and A' are purely independent — pass-by-value, effectively.

The exception is if the type of A is something that is itself defined via AIDL, such as a callback. Then, if the app with A' calls methods on it, those methods are actually invoked on A.

after transferring the object A to another program via IPC, can we obtain the reference of original object A in the program in the client ?

That is not possible, as A and A' belong to separate processes.