summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Steven Moreland <smoreland@google.com> 2018-08-08 10:33:44 -0700
committer android-build-merger <android-build-merger@google.com> 2018-08-08 10:33:44 -0700
commita9bc7ee4ed6aee86d69c1c8cf1fdb0e8a027ae09 (patch)
tree226816516835f88860b8a9eb0e27ea51f4490b34
parent8fc67bd66012785a4bf32c0ba5b0251b7709f074 (diff)
parentd519d9c79f17df975b7d64e6062bd7a987edbeca (diff)
Merge changes Ie10042ca,Ic5203951
am: d519d9c79f Change-Id: Ic7b7d32605006da0a6b1d7e817cc05e0d27f3512
-rw-r--r--libs/binder/IServiceManager.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/libs/binder/IServiceManager.cpp b/libs/binder/IServiceManager.cpp
index 17e098c541..c44a17ec25 100644
--- a/libs/binder/IServiceManager.cpp
+++ b/libs/binder/IServiceManager.cpp
@@ -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);