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

Commit 24bbf6b4 authored by Automerger Merge Worker's avatar Automerger Merge Worker
Browse files

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

Merge "Merge "lazy AIDL services: test multiple callbacks" am: 1b04091c am: fbae9509 am: 217f5258" into udc-dev-plus-aosp am: 231177e5

Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/2534513



Change-Id: Ia111c7ed113bedc6252926ba377ba8384d9d8227
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents e6bda0b5 231177e5
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();