lazy AIDL services: multiple callbacks
This guarantees that client callbacks will get notified that there are clients, if they are added to servicemanager after a service notification has already been sent. Typically, in Android, only one client callback is used at a time, registered from the service that is lazy itself. However, if a service quits and then is restarted quickly, the old client callback wouldn't be cleared, and so the notification was getting sent to that callback instead of the new one. Now, when the new callback is added, it gets the service notification. One possible other implementation of this would be to unregister client callbacks implicitly when services are unregistered. However, this may break other uses of client callbacks in the future, so instead in this case, we choose to keep all the client callbacks in a consistent state (even though again, it should only happen when there is a race). aidl_lazy_test is updated above this CL Bug: 278038751 Test: aidl_lazy_test Change-Id: Ib9e69679a3c9c7e62c5c4fc4893cad2dd1c5e8fe
Loading
Please register or sign in to comment