Code example for CountDownLatch

Methods: countDown

0
	   
  private final CountDownLatch mOnInitLock;
 
  public ACustomFacade(FacadeManager manager) {
    super(manager);
    mOnInitLock = new CountDownLatch(1);
    mOnInitLock.countDown();
  } 
 
  public void shutdown() { 
  } 
 
  // Usage example from Python code: 
  //  
  // import android 
  // droid = android.Android() 
  // droid.aHelloFonction("hello rpc") 
  @Rpc(description = "Print hello in logcat") 
  public void aHelloFonction(@RpcParameter(name = "message") String message) throws InterruptedException {
    mOnInitLock.await();
    Log.i(GlobalConstants.LOG_TAG, "ACustomFacade received: " + message);