diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-10 03:01:33 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-10 03:01:33 +0000 |
commit | 1c4ac8b0f2bebc80bd060a788207ad4d3c92b415 (patch) | |
tree | 951d075e368183d8cd3d5669b8d537849d807083 | |
parent | 8f2985618859c4d9ee8484967a61d136cd2a9985 (diff) | |
parent | 217320329b298bc5e19a22f8345972f553f53f2b (diff) | |
download | native-1c4ac8b0f2bebc80bd060a788207ad4d3c92b415.tar.gz |
Merge cherrypicks of [15800897, 15800899, 15800901, 15800903, 15800905, 15801007, 15800676, 15800678, 15800969, 15800800] into security-aosp-qt-releaseandroid-security-10.0.0_r63android-security-10.0.0_r62android-security-10.0.0_r61android-security-10.0.0_r60
Change-Id: Icfdf3a4b66055213724c15f84cca4c6910474d97
-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()); |