Binder issue during callback from Server process worker thread to client process

55 Views Asked by At

Good Day!

I am new to android and need help to resolve the issue faced during Binder IPC communication. Problem statement is shown in the steps below.

  1. Server process in the HAL layer creates thread pool, adds aidl service and joins threadpool. It provides the aidl interfaces and implementations for the same.

  2. Client process in the native android layer gets the service and registers callback via service handler.

  3. Server process in turn creates the socket, creates two worker threads one for listening and reading data from socket and other for processing the received data and starts them.

  4. Second thread while processing the socket data, invokes the client process callback for some data processing.

  5. Even though the client registered pointers are valid while invoking the callback from the server thread, client callback function is not hit.

Same issue i tried to depict in the picture.

Your inputs will greatly help me to know and understand why the client call back function is not executed when is invocation from server thread, and how can i fix this. Thank you!

0

There are 0 best solutions below