Code example for CopyOnWriteArrayList

Methods: size

0
	 
	/** 
	 * Process badge request. 
	 */ 
	private static void processBadge () { 
		if (badge_playing || badge_requests.size() == 0)
			return; 
		 
		badge_playing = true;
		 
		new Thread (new Runnable () {
			public void run () { 
				final BadgeRequest br = badge_requests.remove(0);
				final TVBadge badge = BadgeManager.getBadge(br.badge_id);
				 
				// prepare badge image 
				if (!BadgeImageManager.isBadgeImageExistInStorage(br.badge_id))
					BadgeImageManager.downloadBadgeImage(br.badge_id);
				 
				if (_instance != null) {
					_instance.runOnUiThread( new Runnable () {