Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53a7cf13 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Try to avoid duplicate bindings and wasted work

- onBindingDied is called when a package is upgraded, so we don't
need to rebind during onPackagesChanged
- remove binderDied, which was only partially cleaning up state
- we definitely don't need to mess with the binding of other apps
when one of them updates
- try to track 'we're going to bind to a service' more accurately
- Slog.wtf if we're still managing to bind twice
- Don't unbind just before binding

Flag: com.android.server.notification.use_on_binding_died
Bug: 434679743
Test: ManagedServicesTest
Test: NotificationManagerTest
Test: NotificationAssistantServiceTest
Test: NotificationManagerZenTest
Test: manual - update an app and verify that it's still receiving notifications
after the rebind delay (and that it's only in the list once)
Test: manual - update an app ro remove the BIND_NOTIFICATION_LISTENER_SERVICE
permission - verify that it's not bound after the rebind delay

Change-Id: I92ed7dcb94cc327c162b440afe089f6d8ba5b368
parent 798e5cd0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment