public void waitForReady() throws InterruptedException {
if (!mReadyLatch.await(TimeUnit.NANOSECONDS.convert(
SLAVE_AAPT_TIMEOUT_IN_SECONDS, TimeUnit.SECONDS))) {
throw new RuntimeException(String.format(
"Timed out while waiting for slave aapt process, make sure "
+ "the aapt execute at %1$s can run successfully (some anti-virus may "
+ "block it) or try setting environment variable SLAVE_AAPT_TIMEOUT to a "
+ "value bigger than %2$d seconds",
mAaptLocation, SLAVE_AAPT_TIMEOUT_IN_SECONDS));
}
if (mReady.get()) {
mLogger.verbose("Slave %1$s is ready", hashCode());
} else {
mLogger.verbose("Slave %1$s failed to start", hashCode());
}
}