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

Commit fbae9509 authored by Steven Moreland's avatar Steven Moreland Committed by Automerger Merge Worker
Browse files

Merge "lazy AIDL services: test multiple callbacks" am: 1b04091c

parents 944794e9 1b04091c
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -324,6 +324,10 @@ LazyServiceRegistrar& LazyServiceRegistrar::getInstance() {
    return *registrarInstance;
}

LazyServiceRegistrar LazyServiceRegistrar::createExtraTestInstance() {
    return LazyServiceRegistrar();
}

status_t LazyServiceRegistrar::registerService(const sp<IBinder>& service, const std::string& name,
                                               bool allowIsolated, int dumpFlags) {
    if (!mClientCC->registerService(service, name, allowIsolated, dumpFlags)) {
+11 −1
Original line number Diff line number Diff line
@@ -93,6 +93,16 @@ class LazyServiceRegistrar {
      */
     void reRegister();

     /**
      * Create a second instance of lazy service registrar.
      *
      * WARNING: dangerous! DO NOT USE THIS - LazyServiceRegistrar
      * should be single-instanced, so that the service will only
      * shut down when all services are unused. A separate instance
      * is only used to test race conditions.
      */
     static LazyServiceRegistrar createExtraTestInstance();

 private:
     std::shared_ptr<internal::ClientCounterCallback> mClientCC;
     LazyServiceRegistrar();