Add sleep in unsafe path.
Devices w/o ENFORCE_VINTF_MANIFEST are likely to race during boot up.
Adding a sleep on this path since I've seen no indication or bugs
related to the log on the internal issue tracking system.
Testing locally on walleye (by moving the sleep to apply to all devices)
and this makes boot ~40s. This should be enough so that it is noticed on
any development devices during this release.
Bug: 67974785
Test: boot (w/ and w/o sleep inside of the conditional)
With the change as is, no change in boot time.
Change-Id: I39ee94fdc0657b39b9f73b32acc9477b040f8de6
diff --git a/transport/ServiceManagement.cpp b/transport/ServiceManagement.cpp
index ab216ae..884b056 100644
--- a/transport/ServiceManagement.cpp
+++ b/transport/ServiceManagement.cpp
@@ -785,6 +785,7 @@
"enable PRODUCT_ENFORCE_VINTF_MANIFEST on this device (this is also enabled by "
"PRODUCT_FULL_TREBLE). PRODUCT_ENFORCE_VINTF_MANIFEST will ensure that no race "
"condition is possible here.");
+ sleep(1);
}
for (int tries = 0; !getStub && (vintfHwbinder || vintfLegacy); tries++) {