diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-10 03:01:08 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2021-09-10 03:01:08 +0000 |
commit | a5a6e17d7e7bb12bc50d02923baab0a90f311a77 (patch) | |
tree | 3e4a08987dcb30f8b3906a4f22dfc2c5d4980c31 | |
parent | e064da974e0ffa0407e8697b2c5cdd02814aa84c (diff) | |
parent | 1488263c8fea94c020acf9f06a97388c3fb20e98 (diff) | |
download | native-a5a6e17d7e7bb12bc50d02923baab0a90f311a77.tar.gz |
Merge cherrypicks of [15800877, 15799943, 15800878, 15799944, 15800879, 15800987, 15800365, 15799765] into security-aosp-pi-releaseandroid-security-9.0.0_r76android-security-9.0.0_r75android-security-9.0.0_r74pie-security-release
Change-Id: I09591f7a6b91afcb080294e5d68e914b01bab716
-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 be3bbf7494..af34c1d694 100644 --- a/libs/binder/IServiceManager.cpp +++ b/libs/binder/IServiceManager.cpp @@ -148,7 +148,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) { char bootCompleted[PROPERTY_VALUE_MAX]; property_get("sys.boot_completed", bootCompleted, "0"); @@ -158,7 +159,7 @@ public: const long sleepTime = gSystemBootCompleted ? 1000 : 100; int n = 0; - while (uptimeMillis() < timeout) { + while (uptimeMillis() - startTime < timeout) { n++; if (isVendorService) { ALOGI("Waiting for vendor service %s...", String8(name).string()); |