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

Commit a52c368f authored by Andy Hung's avatar Andy Hung Committed by android-build-merger
Browse files

IServiceManager: Improve getService responsiveness in absence of service

am: 3b36bcf7

Change-Id: Idf103a3faaa30ce085b4af565dcf72096a7e3242
parents 0932701e 3b36bcf7
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -140,10 +140,12 @@ public:
    {
        unsigned n;
        for (n = 0; n < 5; n++){
            if (n > 0) {
                ALOGI("Waiting for service %s...", String8(name).string());
                sleep(1);
            }
            sp<IBinder> svc = checkService(name);
            if (svc != NULL) return svc;
            ALOGI("Waiting for service %s...\n", String8(name).string());
            sleep(1);
        }
        return NULL;
    }