summaryrefslogtreecommitdiff
path: root/libs/binder/ActivityManager.cpp
diff options
context:
space:
mode:
author Svetoslav Ganov <svetoslavganov@google.com> 2018-02-22 00:29:30 -0800
committer Svetoslav Ganov <svetoslavganov@google.com> 2018-02-22 00:29:35 -0800
commit86fc4f34dfc0070d8e587e2af323f1e8b54f933d (patch)
tree7a76e37a3aba05bb67364e18b1c83ce077cc2ced /libs/binder/ActivityManager.cpp
parent7e3b57a2f100bd7047ee33e786e9ac32185270d5 (diff)
Don't block long time gettng system service
Test: run google/template/local --template:map test google/continuous/boot-successive --no-first-boot --successive-boot --boot-count 10 --granular-boot-info -f SystemServerTiming_StartServices,SystemServerTiming_StartAudioService bug:72322854 Change-Id: Ie287e0a8f1ed10f9a535b489cef6f3db184e41cb
Diffstat (limited to 'libs/binder/ActivityManager.cpp')
-rw-r--r--libs/binder/ActivityManager.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/binder/ActivityManager.cpp b/libs/binder/ActivityManager.cpp
index 7724bf151e..e1cc5da2e9 100644
--- a/libs/binder/ActivityManager.cpp
+++ b/libs/binder/ActivityManager.cpp
@@ -15,6 +15,8 @@
*/
#include <mutex>
+#include <unistd.h>
+
#include <binder/ActivityManager.h>
#include <binder/Binder.h>
#include <binder/IServiceManager.h>
@@ -44,7 +46,7 @@ sp<IActivityManager> ActivityManager::getService()
service = NULL;
break;
}
- sleep(1);
+ usleep(25000);
} else {
service = interface_cast<IActivityManager>(binder);
mService = service;