summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/RegionSamplingThread.cpp
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2023-04-13 20:29:33 +0000
committer Steven Moreland <smoreland@google.com> 2023-04-14 01:26:26 +0000
commit7bb4ab864585475690b4ef73ee1cc691c85231e5 (patch)
tree4aad8bd75392fbc1e02fa4766bcad75f557d8381 /services/surfaceflinger/RegionSamplingThread.cpp
parentba9df0b0dee1bbce3d29d99203c4e835f255408a (diff)
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
Diffstat (limited to 'services/surfaceflinger/RegionSamplingThread.cpp')
0 files changed, 0 insertions, 0 deletions