private static void updateSplash(Semaphore semaphore, StartupEventListener listener) {
ServiceTracker<StartupMonitor, StartupMonitor> monitorTracker = new ServiceTracker<StartupMonitor, StartupMonitor>(context, StartupMonitor.class.getName(), null);
monitorTracker.open();
try {
while (true) {
StartupMonitor monitor = monitorTracker.getService();
if (monitor != null) {
try {
monitor.update();
} catch (Throwable e) {
// ignore exceptions thrown by the monitor
}
}
// can we acquire the semaphore yet?