Home > Mobile >  When two app binding, pid, the uid value capture
When two app binding, pid, the uid value capture

Time:09-30

Have a client and the server, the client implementation to invoke the service the service method, but using the following code on the server to check the client uid, pid,
Int a=Binder. GetCallingPid ();
Int b=android. OS. Process. MyPid ();
Int c=Binder. GetCallingUid ();
Int. D=android OS. Process. MyUid ();
The e (" AIDL ", "Client Pid=" + a);
The e (" AIDL ", "Service Pid=" + b);
The e (" AIDL ", "Client Uid=" + c);
The e (" AIDL ", "Service Uid=" + d);
The above code is written in the onbind, but why get the uid, pid values are the same, on the other function can display the correct uid, pid, sprout new consult!!!!!