Code example for CyclicBarrier

Methods: await

0
	} 
 
	public boolean onError(MediaPlayer mp, int what, int extra) {
		Log.w(idTag, Logging.getCurrentMethodName(mp, what, extra));
		try { 
			errorBarrier.await(ERROR_SLEEP_MILLIS, TimeUnit.MILLISECONDS);
		} catch (InterruptedException e) {
			e.printStackTrace();
		} catch (BrokenBarrierException e) {
			e.printStackTrace();
		} catch (TimeoutException e) {
			e.printStackTrace();
		} 
		return true; 
	} 
 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE