diff options
author | Steven Moreland <smoreland@google.com> | 2021-09-03 22:08:10 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-09-03 22:08:10 +0000 |
commit | 17aa765fd3508e1202ef7cf03b07eced11fc1d5e (patch) | |
tree | 951d075e368183d8cd3d5669b8d537849d807083 | |
parent | 1f39db790105e5678be8a9feb8fb1940ecb1e549 (diff) | |
parent | 3ba4963f5baf1c9a3a461f1c6a0caa7fb65aa6db (diff) | |
download | native-17aa765fd3508e1202ef7cf03b07eced11fc1d5e.tar.gz |
libbinder: uptimeMillis returns int64_t! am: 3ba4963f5b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15720346
Change-Id: Ic08346b606933f364a2dbdad7a09c97b9ef059e7
-rw-r--r-- | libs/binder/IServiceManager.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp index 4ba6c2a923..8cd2d45c92 100644 --- a/libs/binder/IServiceManager.cpp +++ b/libs/binder/IServiceManager.cpp @@ -147,7 +147,8 @@ public: 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(); if (!gSystemBootCompleted && !isVendorService) { // Vendor code can't access system properties char bootCompleted[PROPERTY_VALUE_MAX]; @@ -158,7 +159,7 @@ public: 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()); |