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

Commit 62eaabc3 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder: uptimeMillis returns int64_t! am: 3ba4963f am: 17aa765f am: d666af69

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

Bug: 197336441

Change-Id: I703760ecbfa007d27caf76556ed21bbf0558df80
parents 78e5cf5c d666af69
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -215,7 +215,8 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const

    const bool isVendorService =
        strcmp(ProcessState::self()->getDriverName().c_str(), "/dev/vndbinder") == 0;
    const long timeout = uptimeMillis() + 5000;
    const long timeout = 5000;
    int64_t startTime = uptimeMillis();
    // Vendor code can't access system properties
    if (!gSystemBootCompleted && !isVendorService) {
#ifdef __ANDROID__
@@ -230,7 +231,7 @@ sp<IBinder> ServiceManagerShim::getService(const String16& name) const
    const long sleepTime = gSystemBootCompleted ? 1000 : 100;

    int n = 0;
    while (uptimeMillis() < timeout) {
    while (uptimeMillis() - startTime < timeout) {
        n++;
        ALOGI("Waiting for service '%s' on '%s'...", String8(name).string(),
            ProcessState::self()->getDriverName().c_str());