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

Commit a9bc7ee4 authored by Steven Moreland's avatar Steven Moreland Committed by android-build-merger
Browse files

Merge changes Ie10042ca,Ic5203951

am: d519d9c7

Change-Id: Ic7b7d32605006da0a6b1d7e817cc05e0d27f3512
parents 8fc67bd6 d519d9c7
Loading
Loading
Loading
Loading
+5 −8
Original line number Diff line number Diff line
@@ -149,23 +149,20 @@ public:
        const bool isVendorService =
            strcmp(ProcessState::self()->getDriverName().c_str(), "/dev/vndbinder") == 0;
        const long timeout = uptimeMillis() + 5000;
        if (!gSystemBootCompleted) {
        if (!gSystemBootCompleted && !isVendorService) {
            // Vendor code can't access system properties
            char bootCompleted[PROPERTY_VALUE_MAX];
            property_get("sys.boot_completed", bootCompleted, "0");
            gSystemBootCompleted = strcmp(bootCompleted, "1") == 0 ? true : false;
        }
        // retry interval in millisecond.
        // retry interval in millisecond; note that vendor services stay at 100ms
        const long sleepTime = gSystemBootCompleted ? 1000 : 100;

        int n = 0;
        while (uptimeMillis() < timeout) {
            n++;
            if (isVendorService) {
                ALOGI("Waiting for vendor service %s...", String8(name).string());
                CallStack stack(LOG_TAG);
            } else if (n%10 == 0) {
                ALOGI("Waiting for service %s...", String8(name).string());
            }
            ALOGI("Waiting for service '%s' on '%s'...", String8(name).string(),
                ProcessState::self()->getDriverName().c_str());
            usleep(1000*sleepTime);

            sp<IBinder> svc = checkService(name);